.llmf-settings-page {
	--llmf-accent: #2271b1;
	--llmf-accent-strong: #135e96;
	--llmf-bg: #f6f7f7;
	--llmf-panel: #fff;
	--llmf-border: #dcdcde;
	--llmf-border-strong: #c3c4c7;
	--llmf-text: #1d2327;
	--llmf-muted: #646970;
	--llmf-success: #008a20;
	--llmf-warning: #996800;
	--llmf-danger: #b32d2e;
	--llmf-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	max-width: 1280px;
}

.llmf-app-header {
	align-items: flex-end;
	background: var(--llmf-panel);
	border: 1px solid var(--llmf-border);
	border-radius: 8px;
	box-shadow: var(--llmf-shadow);
	display: flex;
	gap: 20px;
	justify-content: space-between;
	margin: 18px 0 18px;
	padding: 22px 24px;
}

.llmf-app-header h1 {
	font-size: 28px;
	line-height: 1.2;
	margin: 0;
}

.llmf-app-header__eyebrow {
	color: var(--llmf-accent-strong);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 6px;
	text-transform: uppercase;
}

.llmf-app-header__summary {
	color: var(--llmf-muted);
	font-size: 14px;
	margin: 8px 0 0;
	max-width: 620px;
}

.llmf-app-header__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.llmf-settings-shell {
	align-items: flex-start;
	display: grid;
	gap: 18px;
	grid-template-columns: 220px minmax(0, 1fr);
}

.llmf-settings-nav {
	background: var(--llmf-panel);
	border: 1px solid var(--llmf-border);
	border-radius: 8px;
	box-shadow: var(--llmf-shadow);
	padding: 8px;
	position: sticky;
	top: 48px;
}

.llmf-settings-nav__link {
	border-radius: 6px;
	color: var(--llmf-text);
	display: block;
	line-height: 1.35;
	padding: 9px 10px;
	text-decoration: none;
}

.llmf-settings-nav__link:hover,
.llmf-settings-nav__link:focus {
	background: #f0f6fc;
	color: var(--llmf-accent-strong);
	outline: none;
}

.llmf-settings-content {
	min-width: 0;
}

.llmf-settings-form {
	margin: 0;
}

.llmf-panel {
	background: var(--llmf-panel);
	border: 1px solid var(--llmf-border);
	border-radius: 8px;
	box-shadow: var(--llmf-shadow);
	margin: 0 0 16px;
	overflow: clip;
}

.llmf-panel__header {
	border-bottom: 1px solid #edf0f2;
	padding: 18px 20px 14px;
}

.llmf-panel__header h2 {
	font-size: 18px;
	line-height: 1.3;
	margin: 0;
}

.llmf-panel__header p {
	color: var(--llmf-muted);
	margin: 6px 0 0;
	max-width: 760px;
}

.llmf-panel__body {
	padding: 18px 20px 20px;
}

.llmf-field {
	border-bottom: 1px solid #f0f0f1;
	display: grid;
	gap: 16px;
	grid-template-columns: minmax(170px, 250px) minmax(0, 1fr);
	padding: 16px 0;
}

.llmf-field:first-child {
	padding-top: 0;
}

.llmf-field:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.llmf-field__label {
	color: var(--llmf-text);
	display: block;
	font-weight: 600;
	line-height: 1.4;
	padding-top: 6px;
}

.llmf-field__control {
	min-width: 0;
}

.llmf-field--full .llmf-field__control,
.llmf-field > .llmf-field__control:only-child {
	grid-column: 1 / -1;
}

.llmf-field-description {
	color: var(--llmf-muted);
	max-width: 780px;
}

.llmf-text-field {
	max-width: 420px;
	width: 100%;
}

.llmf-code-field {
	font-family: Consolas, Monaco, monospace;
	max-width: 820px;
	width: 100%;
}

.llmf-number-field {
	width: 96px;
}

.llmf-status-grid,
.llmf-diagnostic-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.llmf-status-card,
.llmf-diagnostic-card {
	background: #fbfcfd;
	border: 1px solid #e6e8eb;
	border-radius: 8px;
	min-width: 0;
	padding: 14px;
}

.llmf-status-card__top,
.llmf-diagnostic-card__top {
	align-items: flex-start;
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.llmf-status-card h3,
.llmf-diagnostic-card h3 {
	font-size: 13px;
	line-height: 1.35;
	margin: 0;
}

.llmf-status-card__value {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 12px 0 4px;
	overflow-wrap: anywhere;
}

.llmf-status-card__description,
.llmf-diagnostic-card p {
	color: var(--llmf-muted);
	margin: 0;
	overflow-wrap: anywhere;
}

.llmf-badge {
	border: 1px solid var(--llmf-border);
	border-radius: 999px;
	display: inline-flex;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	padding: 3px 8px;
	white-space: nowrap;
}

.llmf-badge--success {
	background: #edfaef;
	border-color: #b8e6bf;
	color: #006b1a;
}

.llmf-badge--warning {
	background: #fff8e5;
	border-color: #f0d98a;
	color: var(--llmf-warning);
}

.llmf-badge--muted {
	background: #f0f0f1;
	border-color: #dcdcde;
	color: var(--llmf-muted);
}

.llmf-badge--neutral {
	background: #f0f6fc;
	border-color: #c5d9ed;
	color: var(--llmf-accent-strong);
}

.llmf-endpoint-strip,
.llmf-inline-preview {
	align-items: center;
	background: #f6f7f7;
	border: 1px solid #e6e8eb;
	border-radius: 8px;
	display: grid;
	gap: 12px;
	margin-top: 16px;
	padding: 12px 14px;
}

.llmf-endpoint-strip {
	grid-template-columns: minmax(0, 1fr) auto;
}

.llmf-inline-preview {
	grid-template-columns: auto minmax(0, 1fr) auto;
}

.llmf-endpoint-strip code,
.llmf-inline-preview code {
	overflow-wrap: anywhere;
}

.llmf-endpoint-strip__label,
.llmf-inline-preview span {
	color: var(--llmf-muted);
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin: 0;
}

.llmf-endpoint-strip__label {
	margin-bottom: 4px;
}

.llmf-copy-small {
	flex: 0 0 auto;
}

.llmf-switch-field {
	align-items: start;
	display: grid;
	column-gap: 16px;
	grid-template-columns: 64px minmax(0, 1fr);
	max-width: 920px;
	position: relative;
	width: 100%;
}

.llmf-switch-field__input {
	height: 1px;
	margin: 0;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.llmf-switch-field__track {
	background: #8c8f94;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
	flex: 0 0 auto;
	height: 24px;
	margin-top: 2px;
	position: relative;
	transition: background 160ms ease;
	width: 44px;
}

.llmf-switch-field__thumb {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	height: 18px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: transform 160ms ease;
	width: 18px;
}

.llmf-switch-field__input:checked + .llmf-switch-field__track {
	background: var(--llmf-accent);
}

.llmf-switch-field__input:checked + .llmf-switch-field__track .llmf-switch-field__thumb {
	transform: translateX(20px);
}

.llmf-switch-field__input:focus-visible + .llmf-switch-field__track {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--llmf-accent);
}

.llmf-switch-field__copy {
	display: grid;
	gap: 4px;
	min-width: 0;
	padding-top: 1px;
}

.llmf-switch-field__label {
	display: block;
	font-weight: 600;
	line-height: 1.35;
	max-width: 760px;
	overflow-wrap: anywhere;
}

.llmf-switch-field__description {
	color: var(--llmf-muted);
	display: block;
	line-height: 1.45;
	margin: 0;
	max-width: 860px;
}

.llmf-segmented {
	align-items: stretch;
	border: 0;
	display: inline-grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	max-width: 620px;
	padding: 0;
	width: 100%;
}

.llmf-segmented__option {
	cursor: pointer;
	display: grid;
	position: relative;
}

.llmf-segmented__option input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.llmf-segmented__option span {
	align-items: center;
	background: #fff;
	border: 1px solid var(--llmf-border-strong);
	box-sizing: border-box;
	cursor: pointer;
	display: flex;
	font-weight: 600;
	height: 100%;
	justify-content: center;
	line-height: 1.35;
	min-height: 52px;
	padding: 9px 12px;
	text-align: center;
}

.llmf-segmented__option:first-of-type span {
	border-radius: 6px 0 0 6px;
}

.llmf-segmented__option:last-of-type span {
	border-left: 0;
	border-radius: 0 6px 6px 0;
}

.llmf-segmented__option input:checked + span {
	background: #f0f6fc;
	border-color: var(--llmf-accent);
	color: var(--llmf-accent-strong);
}

.llmf-segmented__option input:focus-visible + span {
	box-shadow: inset 0 0 0 2px var(--llmf-accent);
}

.llmf-post-type-grid {
	border: 0;
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(180px, 250px));
	margin: 0;
	padding: 0;
}

.llmf-post-type-card {
	background: #fff;
	border: 1px solid var(--llmf-border);
	border-radius: 8px;
	cursor: pointer;
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 1fr) auto;
	min-width: 0;
	padding: 12px;
	position: relative;
}

.llmf-post-type-card input {
	height: 1px;
	opacity: 0;
	position: absolute;
	width: 1px;
}

.llmf-post-type-card:has(input:checked) {
	background: #f0f6fc;
	border-color: var(--llmf-accent);
}

.llmf-post-type-card:has(input:focus-visible) {
	box-shadow: 0 0 0 2px var(--llmf-accent);
}

.llmf-post-type-card__body {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.llmf-post-type-card__label {
	font-weight: 600;
	overflow-wrap: anywhere;
}

.llmf-post-type-card__badge {
	color: var(--llmf-accent-strong);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.llmf-post-type-grid .llmf-field-description {
	grid-column: 1 / -1;
	margin: 2px 0 0;
}

.llmf-excluded-posts__wrap {
	border: 0;
	display: grid;
	gap: 12px;
	max-width: 820px;
}

.llmf-excluded-posts__dirty,
.llmf-preview__dirty {
	background: #fff8e5;
	border: 1px solid #f0d98a;
	border-radius: 6px;
	color: var(--llmf-warning);
	margin: 0;
	padding: 8px 10px;
}

.llmf-excluded-posts__type {
	background: #fbfcfd;
	border: 1px solid #e6e8eb;
	border-radius: 8px;
	padding: 16px;
	position: relative;
}

.llmf-excluded-posts__type--hidden {
	display: none;
}

.llmf-excluded-posts__type-header {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin-bottom: 12px;
}

.llmf-excluded-posts__type-title {
	font-size: 15px;
	line-height: 1.4;
	margin: 0;
}

.llmf-excluded-posts__type-meta {
	color: var(--llmf-muted);
	margin: 4px 0 0;
}

.llmf-excluded-posts__search {
	max-width: 620px;
}

.llmf-excluded-posts__search-label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.llmf-excluded-posts__search-control {
	max-width: 620px;
	position: relative;
}

.llmf-excluded-posts__search-input {
	max-width: 100%;
	width: 100%;
}

.llmf-excluded-posts__dropdown {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
	box-sizing: border-box;
	left: 0;
	margin-top: 4px;
	max-height: 240px;
	opacity: 0;
	overflow: auto;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: 100%;
	transform: translateY(-2px);
	transition: opacity 120ms ease, transform 120ms ease;
	width: 100%;
	z-index: 20;
}

.llmf-excluded-posts__dropdown[hidden] {
	display: none;
}

.llmf-excluded-posts__dropdown.is-open {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.llmf-excluded-posts__dropdown-item {
	align-items: center;
	border-bottom: 1px solid #f0f0f1;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	padding: 9px 10px;
}

.llmf-excluded-posts__dropdown-item:last-child {
	border-bottom: 0;
}

.llmf-excluded-posts__dropdown-item button {
	flex: 0 0 auto;
	white-space: nowrap;
}

.llmf-excluded-posts__selected-title {
	font-weight: 600;
	margin: 14px 0 6px;
}

.llmf-excluded-posts__count {
	background: #f0f0f1;
	border-radius: 999px;
	color: var(--llmf-muted);
	display: inline-block;
	font-size: 12px;
	margin-left: 4px;
	min-width: 18px;
	padding: 1px 7px;
	text-align: center;
}

.llmf-excluded-posts__selected {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	max-height: 260px;
	overflow: auto;
	padding: 8px;
}

.llmf-excluded-posts__selected-item {
	align-items: center;
	border-bottom: 1px solid #f0f0f1;
	display: flex;
	gap: 8px;
	justify-content: space-between;
	padding: 7px 4px;
}

.llmf-excluded-posts__selected-item:last-child {
	border-bottom: 0;
}

.llmf-inline-checkbox {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	max-width: 100%;
	vertical-align: top;
}

.llmf-excluded-posts__selected-label {
	flex: 0 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

.llmf-excluded-posts__selected-item .button-link {
	align-items: center;
	color: var(--llmf-danger);
	display: inline-flex;
	height: 30px;
	justify-content: center;
	margin-left: auto;
	text-decoration: none;
	width: 30px;
}

.llmf-excluded-posts__selected-item .button-link:hover,
.llmf-excluded-posts__selected-item .button-link:focus {
	color: #8a2424;
}

.llmf-excluded-posts__empty {
	margin: 0;
}

.llmf-preview {
	background: #f6f7f7;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	margin-top: 18px;
	padding: 14px;
}

.llmf-preview__header {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.llmf-preview__header h3 {
	font-size: 15px;
	margin: 0;
}

.llmf-preview__header p {
	color: var(--llmf-muted);
	margin: 4px 0 0;
}

.llmf-preview__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.llmf-preview__dirty {
	margin-top: 12px;
}

.llmf-preview__meta {
	color: var(--llmf-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 8px;
}

.llmf-preview__meta span {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	padding: 3px 8px;
}

.llmf-preview__content {
	background: #101517;
	border-radius: 6px;
	color: #f6f7f7;
	font-family: Consolas, Monaco, monospace;
	line-height: 1.55;
	margin: 0;
	max-height: 420px;
	overflow: auto;
	padding: 14px;
	white-space: pre-wrap;
}

.llmf-crawler-diagnostics {
	max-width: 920px;
}

.llmf-crawler-diagnostics code {
	word-break: break-all;
}

.llmf-crawler-guide {
	margin-top: 16px;
}

.llmf-crawler-guide__header {
	margin-bottom: 12px;
}

.llmf-crawler-guide__header h3 {
	font-size: 15px;
	line-height: 1.35;
	margin: 0 0 4px;
}

.llmf-crawler-guide__header p {
	color: var(--llmf-muted);
	margin: 0;
}

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

.llmf-crawler-guide__item {
	background: #fbfcfd;
	border: 1px solid #e6e8eb;
	border-radius: 8px;
	min-width: 0;
	padding: 14px;
}

.llmf-crawler-guide__item h4 {
	font-size: 13px;
	line-height: 1.35;
	margin: 0 0 8px;
}

.llmf-crawler-guide__item p {
	color: var(--llmf-muted);
	margin: 0;
}

.llmf-crawler-guide__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-top: 10px;
}

.llmf-crawler-guide__example-label {
	font-weight: 600;
	margin-top: 12px !important;
}

.llmf-crawler-guide__example {
	background: #101517;
	border-radius: 6px;
	color: #f6f7f7;
	font-family: Consolas, Monaco, monospace;
	font-size: 12px;
	line-height: 1.5;
	margin: 8px 0 0;
	overflow: auto;
	padding: 10px;
	white-space: pre;
}

.llmf-crawler-guide__example code {
	color: inherit;
	word-break: normal;
}

.llmf-form-actions {
	margin: 18px 0 24px;
}

.llmf-save-bar {
	align-items: center;
	background: #1d2327;
	border-radius: 8px;
	bottom: 18px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	color: #fff;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	left: calc(160px + 24px);
	margin: 0 auto;
	max-width: 780px;
	padding: 12px 14px;
	position: sticky;
	z-index: 50;
}

.llmf-save-bar.is-saving {
	background: #1d3d5c;
}

.llmf-save-bar.is-success {
	background: #1f6f43;
}

.llmf-save-bar.is-success .llmf-save-bar__actions {
	display: none;
}

.llmf-save-bar.is-error {
	background: #8a2424;
}

.llmf-save-bar[hidden] {
	display: none;
}

.llmf-save-bar__message {
	font-weight: 700;
}

.llmf-save-bar__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.llmf-maintenance-form {
	margin: 0 0 8px;
}

@media (prefers-reduced-motion: reduce) {
	.llmf-switch-field__track,
	.llmf-switch-field__thumb,
	.llmf-excluded-posts__dropdown {
		transition: none;
	}
}

@media screen and (max-width: 1100px) {
	.llmf-status-grid,
	.llmf-diagnostic-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.llmf-post-type-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 782px) {
	.llmf-app-header {
		align-items: flex-start;
		flex-direction: column;
		padding: 18px;
	}

	.llmf-app-header__actions {
		justify-content: flex-start;
		width: 100%;
	}

	.llmf-settings-shell {
		display: block;
	}

	.llmf-settings-nav {
		display: flex;
		gap: 6px;
		margin: 0 0 14px;
		overflow-x: auto;
		position: static;
		white-space: nowrap;
	}

	.llmf-settings-nav__link {
		flex: 0 0 auto;
	}

	.llmf-panel__header,
	.llmf-panel__body {
		padding-left: 14px;
		padding-right: 14px;
	}

	.llmf-field {
		display: block;
	}

	.llmf-field__label {
		margin-bottom: 8px;
		padding-top: 0;
	}

	.llmf-switch-field {
		column-gap: 12px;
		grid-template-columns: 52px minmax(0, 1fr);
	}

	.llmf-status-grid,
	.llmf-diagnostic-grid,
	.llmf-crawler-guide__grid,
	.llmf-post-type-grid {
		grid-template-columns: 1fr;
	}

	.llmf-endpoint-strip,
	.llmf-inline-preview,
	.llmf-preview__header,
	.llmf-excluded-posts__type-header {
		align-items: stretch;
		display: flex;
		flex-direction: column;
	}

	.llmf-preview__actions,
	.llmf-save-bar__actions {
		justify-content: flex-start;
	}

	.llmf-text-field,
	.llmf-code-field,
	.llmf-excluded-posts__search,
	.llmf-excluded-posts__search-control {
		max-width: 100%;
	}

	.llmf-excluded-posts__dropdown-item {
		align-items: flex-start;
		flex-direction: column;
	}

	.llmf-save-bar {
		align-items: stretch;
		bottom: 8px;
		flex-direction: column;
		left: auto;
		max-width: none;
	}
}
