/**
 * ThirdDraft — Settings → ThirdDraft.
 *
 * Every rule is scoped to .thirddraft-wrap. Colours are defined once, here.
 *
 * @package ThirdDraft
 */

.thirddraft-wrap {
	--thirddraft-ink: #1a1512;
	--thirddraft-ink-muted: #4a413b;
	--thirddraft-ink-faint: #7a6e66;
	--thirddraft-rule: #ece4dc;
	--thirddraft-rule-light: #f1eae2;
	--thirddraft-control: #d9d0c3;
	--thirddraft-paper: #f7f3ee;
	--thirddraft-raised: #fff;
	--thirddraft-accent: #f0611a;
	--thirddraft-action: #cc4d0e;
	--thirddraft-action-hover: #b8440b;
	--thirddraft-action-active: #a83e0a;
	--thirddraft-on-action: #fff;
	--thirddraft-ready-fg: #2e7d4f;
	--thirddraft-ready-bg: #e4f2e9;
	--thirddraft-ready-border: #b9dbc5;
	--thirddraft-progress-fg: #a63c0b;
	--thirddraft-progress-bg: #ffe4d3;
	--thirddraft-progress-border: #f0c4a3;
	--thirddraft-attention-fg: #b8700f;
	--thirddraft-attention-bg: #fbebd1;
	--thirddraft-attention-border: #e8cd9b;
	--thirddraft-failure-fg: #b93a2b;
	--thirddraft-failure-bg: #fbe3df;
	--thirddraft-failure-border: #e7b8ae;
	--thirddraft-shadow: 0 1px 2px rgba(26, 21, 18, 0.03), 0 18px 40px -22px rgba(120, 60, 20, 0.22);
	--thirddraft-radius: 14px;
	--thirddraft-gutter: 28px;
}

.thirddraft-wrap .thirddraft-card {
	max-width: 680px;
	min-width: 0;
	margin-top: 20px;
	padding: 0;
	overflow: hidden;
	color: var(--thirddraft-ink);
	background: var(--thirddraft-raised);
	border: 1px solid var(--thirddraft-rule);
	border-radius: var(--thirddraft-radius);
	box-shadow: var(--thirddraft-shadow);
}

.thirddraft-wrap .thirddraft-head {
	padding: 22px var(--thirddraft-gutter) 0;
}

.thirddraft-wrap .thirddraft-wordmark {
	display: inline-flex;
	gap: 10px;
	align-items: center;
}

.thirddraft-wrap .thirddraft-mark {
	display: block;
	flex: none;
	width: 28px;
	height: 28px;
}

.thirddraft-wrap .thirddraft-name {
	font-size: 21px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--thirddraft-ink);
}

.thirddraft-wrap .thirddraft-name-accent {
	color: var(--thirddraft-accent);
}

.thirddraft-wrap .thirddraft-body {
	padding: 18px var(--thirddraft-gutter) 24px;
}

.thirddraft-wrap .thirddraft-lede {
	max-width: 46em;
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--thirddraft-ink-muted);
}

.thirddraft-wrap .thirddraft-status {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 0;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid;
	border-radius: 10px;
}

.thirddraft-wrap .thirddraft-status::before {
	flex: none;
	width: 8px;
	height: 8px;
	margin-top: 7px;
	content: "";
	background: currentColor;
	border-radius: 50%;
}

.thirddraft-wrap .thirddraft-status .spinner {
	float: none;
	flex: none;
	margin: 1px 0 0;
}

.thirddraft-wrap .thirddraft-status.is-progress::before {
	display: none;
}

.thirddraft-wrap .thirddraft-status span {
	color: var(--thirddraft-ink);
}

.thirddraft-wrap .thirddraft-status.is-ready {
	color: var(--thirddraft-ready-fg);
	background: var(--thirddraft-ready-bg);
	border-color: var(--thirddraft-ready-border);
}

.thirddraft-wrap .thirddraft-status.is-progress {
	color: var(--thirddraft-progress-fg);
	background: var(--thirddraft-progress-bg);
	border-color: var(--thirddraft-progress-border);
}

.thirddraft-wrap .thirddraft-status.is-attention {
	color: var(--thirddraft-attention-fg);
	background: var(--thirddraft-attention-bg);
	border-color: var(--thirddraft-attention-border);
}

.thirddraft-wrap .thirddraft-status.is-failure {
	color: var(--thirddraft-failure-fg);
	background: var(--thirddraft-failure-bg);
	border-color: var(--thirddraft-failure-border);
}

.thirddraft-wrap .thirddraft-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.thirddraft-wrap .thirddraft-inline-form {
	display: inline-block;
	margin: 0;
}

.thirddraft-wrap .button.thirddraft-button,
.thirddraft-wrap .button.thirddraft-button-quiet {
	min-height: 40px;
	padding: 0 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 38px;
	border-radius: 8px;
}

.thirddraft-wrap .button-primary.thirddraft-button {
	color: var(--thirddraft-on-action);
	background: var(--thirddraft-action);
	border-color: var(--thirddraft-action);
	box-shadow: none;
	text-shadow: none;
}

.thirddraft-wrap .button-primary.thirddraft-button:hover {
	color: var(--thirddraft-on-action);
	background: var(--thirddraft-action-hover);
	border-color: var(--thirddraft-action-hover);
}

.thirddraft-wrap .button-primary.thirddraft-button:active {
	color: var(--thirddraft-on-action);
	background: var(--thirddraft-action-active);
	border-color: var(--thirddraft-action-active);
}

.thirddraft-wrap .button-primary.thirddraft-button:focus {
	color: var(--thirddraft-on-action);
	background: var(--thirddraft-action);
	border-color: var(--thirddraft-action);
	outline: 2px solid transparent;
	box-shadow: 0 0 0 2px var(--thirddraft-raised), 0 0 0 4px var(--thirddraft-action);
}

.thirddraft-wrap .button.thirddraft-button-quiet {
	color: var(--thirddraft-ink);
	background: var(--thirddraft-raised);
	border-color: var(--thirddraft-control);
}

.thirddraft-wrap .button.thirddraft-button-quiet:hover,
.thirddraft-wrap .button.thirddraft-button-quiet:focus {
	color: var(--thirddraft-ink);
	background: var(--thirddraft-paper);
	border-color: var(--thirddraft-ink-faint);
}

.thirddraft-wrap .thirddraft-section {
	padding: 20px var(--thirddraft-gutter) 24px;
	border-top: 1px solid var(--thirddraft-rule);
}

.thirddraft-wrap .thirddraft-section-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--thirddraft-ink);
}

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

.thirddraft-wrap .thirddraft-field {
	margin: 0;
}

.thirddraft-wrap .thirddraft-field label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--thirddraft-ink-muted);
}

.thirddraft-wrap .thirddraft-field select {
	width: 100%;
	max-width: none;
}

.thirddraft-wrap .thirddraft-check {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 4px 8px;
	align-items: start;
	margin: 0 0 16px;
	line-height: 1.5;
}

.thirddraft-wrap .thirddraft-check input[type="checkbox"] {
	margin: 2px 0 0;
}

.thirddraft-wrap .thirddraft-check label {
	color: var(--thirddraft-ink);
}

.thirddraft-wrap .thirddraft-hint {
	grid-column: 2;
	color: var(--thirddraft-ink-faint);
}

.thirddraft-wrap .thirddraft-articles {
	border-color: var(--thirddraft-rule);
	box-shadow: none;
}

.thirddraft-wrap .thirddraft-articles th {
	font-weight: 600;
	color: var(--thirddraft-ink-muted);
}

.thirddraft-wrap .thirddraft-articles td,
.thirddraft-wrap .thirddraft-articles th {
	padding: 10px 12px;
}

.thirddraft-wrap .thirddraft-articles td:not(.thirddraft-article-title),
.thirddraft-wrap .thirddraft-articles th:not(:first-child) {
	white-space: nowrap;
}

.thirddraft-wrap .thirddraft-article-title a {
	font-weight: 600;
	text-decoration: none;
}

.thirddraft-wrap .thirddraft-foot {
	display: flex;
	justify-content: flex-end;
	padding: 14px var(--thirddraft-gutter);
	background: var(--thirddraft-paper);
	border-top: 1px solid var(--thirddraft-rule);
}

.thirddraft-wrap .thirddraft-foot form {
	margin: 0;
}

.thirddraft-wrap .thirddraft-checks {
	padding: 18px var(--thirddraft-gutter) 20px;
	background: var(--thirddraft-attention-bg);
	border-top: 1px solid var(--thirddraft-attention-border);
	border-bottom: 1px solid var(--thirddraft-attention-border);
}

.thirddraft-wrap .thirddraft-checks + .thirddraft-section {
	border-top: 0;
}

.thirddraft-wrap .thirddraft-checks:last-child {
	border-bottom: 0;
}

.thirddraft-wrap .thirddraft-checks[hidden] {
	display: none;
}

.thirddraft-wrap .thirddraft-checks-title {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--thirddraft-ink);
}

.thirddraft-wrap .thirddraft-checks ul {
	margin: 0;
	padding-left: 18px;
	list-style: disc;
}

.thirddraft-wrap .thirddraft-checks li {
	margin: 0 0 6px;
	font-size: 13px;
	line-height: 1.55;
	color: var(--thirddraft-ink);
	overflow-wrap: anywhere;
}

@media screen and (max-width: 782px) {

	.thirddraft-wrap {
		--thirddraft-gutter: 16px;
	}

	.thirddraft-wrap .thirddraft-fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.thirddraft-wrap .thirddraft-actions .thirddraft-inline-form,
	.thirddraft-wrap .thirddraft-body > .thirddraft-inline-form,
	.thirddraft-wrap .thirddraft-actions .button,
	.thirddraft-wrap .thirddraft-body > .thirddraft-inline-form .button {
		display: block;
		width: 100%;
	}

	.thirddraft-wrap .button.thirddraft-button,
	.thirddraft-wrap .button.thirddraft-button-quiet {
		min-height: 44px;
		line-height: 42px;
		text-align: center;
	}

	.thirddraft-wrap .thirddraft-articles thead {
		display: none;
	}

	.thirddraft-wrap .thirddraft-articles tr,
	.thirddraft-wrap .thirddraft-articles td {
		display: block;
		width: auto;
	}

	.thirddraft-wrap .thirddraft-articles td {
		padding: 2px 12px;
	}

	.thirddraft-wrap .thirddraft-articles td.thirddraft-article-title {
		padding-top: 10px;
	}

	.thirddraft-wrap .thirddraft-articles td:last-child {
		padding-bottom: 10px;
		color: var(--thirddraft-ink-faint);
	}
}
