:root {
	--bg: #f4f5f7;
	--surface: #ffffff;
	--surface-alt: #f9fafb;
	--border: #e2e5ea;
	--text: #1d2430;
	--muted: #6b7280;
	--accent: #2f6feb;
	--accent-dark: #1f55c0;
	--ok: #1f8a4c;
	--ok-bg: #e8f6ee;
	--danger: #c0392b;
	--danger-bg: #fdecea;
	--warn-bg: #fff6e5;
	--radius: 12px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
}

* {
	box-sizing: border-box;
}

html {
	font-size: 16px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.55;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

code {
	background: #eef1f5;
	border-radius: 4px;
	padding: .1em .35em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .9em;
	word-break: break-word;
}

.site-header {
	background: #111827;
	color: #e5e7eb;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
	gap: 16px;
}

.brand {
	color: #fff;
	font-weight: 700;
	letter-spacing: .02em;
	font-size: 1.1rem;
}

.brand span {
	color: #8ab4f8;
}

.brand:hover {
	text-decoration: none;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: .92rem;
}

.site-nav a,
.link-button {
	color: #cbd5e1;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.site-nav a:hover,
.link-button:hover {
	color: #fff;
	text-decoration: none;
}

.container {
	max-width: 1120px;
	margin: 0 auto;
	padding: 32px 24px 64px;
}

.hero {
	background: linear-gradient(135deg, #111827, #1f3a63);
	color: #fff;
	border-radius: var(--radius);
	padding: 40px;
	margin-bottom: 24px;
	box-shadow: var(--shadow);
}

.hero h1 {
	margin: 6px 0 12px;
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	line-height: 1.15;
}

.hero .lead {
	max-width: 720px;
	color: #cbd5e1;
	margin: 0;
}

.hero code {
	background: rgba(255, 255, 255, .12);
	color: #e5e7eb;
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: .75rem;
	font-weight: 700;
	color: var(--muted);
	margin: 0;
}

.hero .eyebrow {
	color: #93c5fd;
}

.panel {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
	margin-bottom: 24px;
}

.panel h2 {
	margin: 0 0 12px;
	font-size: 1.25rem;
}

.panel.empty {
	text-align: center;
	padding: 48px 24px;
}

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

.card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px;
	box-shadow: var(--shadow);
}

.card-footer {
	margin-top: auto;
	padding-top: 16px;
}

.card-footer p {
	margin: 0;
}

.card-footer .lock-note {
	margin-top: 12px;
}

.card-footer p:first-child.lock-note {
	margin-top: 0;
}

.card h2 {
	margin: 0 0 4px;
	font-size: 1.1rem;
}

.card p {
	margin: 8px 0;
}

.lock-note {
	margin-top: 14px;
	padding: 8px 10px;
	background: var(--surface-alt);
	border-radius: 8px;
	color: var(--muted);
	font-size: .88rem;
}

.steps {
	margin: 0;
	padding-left: 22px;
	color: var(--muted);
}

.steps li {
	margin: 8px 0;
}

.steps code {
	color: var(--text);
}

.muted {
	color: var(--muted);
}

.mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .86rem;
}

.nowrap {
	white-space: nowrap;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 0;
	border-radius: 9px;
	background: var(--accent);
	color: #fff;
	padding: 10px 16px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease;
}

.button:hover {
	background: var(--accent-dark);
	text-decoration: none;
}

.button.secondary {
	background: #e8ecf2;
	color: #1f2937;
}

.button.secondary:hover {
	background: #dbe1ea;
}

.button.small {
	padding: 5px 10px;
	font-size: .82rem;
	border-radius: 7px;
}

.link-button.danger {
	color: var(--danger);
}

.link-button.danger:hover {
	color: #8e2419;
}

.inline {
	display: inline;
	margin: 0;
}

.inline-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.inline-form input[type="text"] {
	flex: 1 1 240px;
}

.page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.page-head h1 {
	margin: 4px 0 0;
	font-size: 1.8rem;
}

.stats {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.stat {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 10px 16px;
	font-size: .8rem;
	color: var(--muted);
	text-align: center;
	min-width: 92px;
}

.stat span {
	display: block;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--text);
}

.flash {
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 18px;
	border: 1px solid transparent;
	font-size: .94rem;
}

.flash-ok {
	background: var(--ok-bg);
	border-color: #bfe6cd;
	color: #145c33;
}

.flash-error {
	background: var(--danger-bg);
	border-color: #f5c6c0;
	color: #8e2419;
}

.flash-token {
	background: var(--warn-bg);
	border-color: #f1d9a7;
	color: #6b4700;
	word-break: break-all;
}

.flash-info {
	background: #eaf1fd;
	border-color: #c7d9fb;
	color: #1f3f7a;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 16px;
	align-items: start;
}

.form-grid .span-2 {
	grid-column: span 2;
}

.form-grid .span-3 {
	grid-column: span 3;
}

label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: .88rem;
	font-weight: 600;
	color: #374151;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="file"],
textarea,
select {
	width: 100%;
	border: 1px solid #cfd6e0;
	border-radius: 8px;
	background: #fff;
	padding: 9px 11px;
	font: inherit;
	font-weight: 400;
	color: var(--text);
}

input[type="file"] {
	padding: 7px;
	background: var(--surface-alt);
}

input:focus,
textarea:focus,
select:focus {
	outline: 3px solid rgba(47, 111, 235, .18);
	border-color: var(--accent);
}

textarea {
	resize: vertical;
}

.checkbox {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	font-weight: 400;
}

.checkbox input {
	width: auto;
}

.auth-card {
	max-width: 420px;
	margin: 6vh auto 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 32px;
}

.auth-card h1 {
	margin-top: 0;
	font-size: 1.5rem;
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 20px;
}

.plugin {
	border-top: 1px solid var(--border);
	padding: 20px 0;
}

.plugin:first-of-type {
	border-top: 0;
	padding-top: 4px;
}

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

.plugin-head h3 {
	margin: 0;
	font-size: 1.08rem;
}

.plugin-head p {
	margin: 2px 0 0;
}

.badge {
	display: inline-block;
	border-radius: 999px;
	background: #eef1f5;
	color: #374151;
	padding: 3px 10px;
	font-size: .76rem;
	font-weight: 600;
	white-space: nowrap;
}

.badge-ok {
	background: var(--ok-bg);
	color: #145c33;
}

.badge-off {
	background: var(--danger-bg);
	color: #8e2419;
}

.plugin-meta {
	margin: 14px 0;
	background: var(--surface-alt);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 10px 14px;
}

.plugin-meta summary {
	cursor: pointer;
	font-weight: 600;
	font-size: .9rem;
	color: #374151;
}

.plugin-meta .form-grid {
	margin-top: 14px;
}

.table-wrap {
	overflow-x: auto;
	margin-top: 12px;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9rem;
}

th,
td {
	padding: 9px 10px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}

th {
	font-size: .76rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--muted);
	background: var(--surface-alt);
	white-space: nowrap;
}

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

.changelog {
	max-width: 320px;
	color: #4b5563;
}

.actions {
	text-align: right;
}

.site-footer {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 24px 32px;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: .82rem;
	color: var(--muted);
}

@media (max-width: 760px) {
	.hero {
		padding: 28px 22px;
	}

	.form-grid {
		grid-template-columns: 1fr;
	}

	.form-grid .span-2,
	.form-grid .span-3 {
		grid-column: span 1;
	}

	.container {
		padding: 22px 16px 48px;
	}

	.site-header {
		padding: 0 16px;
	}

	.page-head {
		align-items: flex-start;
	}

	.changelog {
		max-width: 200px;
	}
}

.plugin-head-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.article-link svg {
	display: block;
	flex: 0 0 auto;
}

.article-head {
	margin-bottom: 18px;
}

.article-body {
	padding: 28px 32px;
}

.article-body > :first-child {
	margin-top: 0;
}

.article-body > :last-child {
	margin-bottom: 0;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
	line-height: 1.25;
	margin: 1.4em 0 .5em;
}

.article-body h1 {
	font-size: 1.65rem;
}

.article-body h2 {
	font-size: 1.35rem;
}

.article-body h3 {
	font-size: 1.15rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body table {
	margin: 0 0 1em;
}

.article-body ul,
.article-body ol {
	padding-left: 1.4em;
}

.article-body img {
	max-width: 100%;
	height: auto;
}

.article-body blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 8px 16px;
	border-left: 3px solid var(--accent);
	background: var(--surface-alt);
	color: var(--muted);
}

.article-body pre {
	background: #0f172a;
	color: #e2e8f0;
	padding: 14px 16px;
	border-radius: 10px;
	overflow-x: auto;
}

.article-body pre code {
	background: none;
	color: inherit;
	padding: 0;
	font-size: .86rem;
}

.article-body table {
	border-collapse: collapse;
	width: 100%;
	display: block;
	overflow-x: auto;
}

.article-body th,
.article-body td {
	border: 1px solid var(--border);
	padding: 8px 10px;
	text-align: left;
}

.article-body th {
	background: var(--surface-alt);
}

.article-body hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 24px 0;
}

@media (max-width: 760px) {
	.article-body {
		padding: 20px 18px;
	}
}
