@import url('/css/home.css');
@import url('/css/bin.css');
@import url('/css/editor.css');
@import url('/css/account.css');
@import url('/css/docs.css');
@import url('/css/admin.css');

:root {
	--bg: #121316;
	--bg-deep: #0f1012;
	--bg-band: #101113;
	--bg-code: #0d0e10;
	--surface: #16171a;
	--surface-2: #17181c;
	--surface-bar: #141518;
	--surface-raised: #1b1c20;
	--surface-active: #202126;
	--surface-seg: #26272d;
	--surface-avatar: #2a2b31;
	--surface-hover: #1b1c21;
	--nav-track: #17181b;

	--border: #232429;
	--border-soft: #1e1f23;
	--border-input: #2a2b31;
	--border-input-hover: #3a3b42;
	--border-panel: #27282e;
	--border-bar: #24252a;
	--border-tab: #222328;
	--border-kbd: #2c2d33;

	--text: #e4e4e7;
	--text-2: #c9cad0;
	--text-code: #d4d5da;
	--muted: #8a8b93;
	--dim: #6a6b73;
	--faint: #5d5e66;
	--line-num: #3f4047;
	--line-num-active: #a3a4ab;
	--brace-ghost: #26272c;

	--accent: oklch(0.80 0.12 160);
	--accent-hover: oklch(0.88 0.10 160);
	--accent-soft: oklch(0.80 0.12 160 / 0.08);
	--accent-strip: #16201c;
	--on-accent: #0b0c0e;
	--warn: oklch(0.82 0.10 80);
	--warn-soft: oklch(0.82 0.10 80 / 0.1);
	--danger: oklch(0.58 0.17 25);
	--danger-text: oklch(0.72 0.14 25);
	--danger-bg: oklch(0.20 0.03 25);
	--danger-border: oklch(0.40 0.10 25);
	--discord: oklch(0.62 0.15 275);
	--on-discord: #f4f4f6;

	--syn-keyword: oklch(0.78 0.11 300);
	--syn-function: oklch(0.82 0.10 80);
	--syn-string: oklch(0.80 0.12 160);
	--syn-number: oklch(0.78 0.11 30);
	--syn-property: oklch(0.78 0.11 250);
	--syn-comment: #5d5e66;

	--lang-javascript: oklch(0.82 0.10 80);
	--lang-typescript: oklch(0.78 0.11 230);
	--lang-python: oklch(0.78 0.11 250);
	--lang-rust: oklch(0.78 0.11 30);
	--lang-go: oklch(0.80 0.11 200);
	--lang-sql: oklch(0.78 0.11 300);
	--lang-css: oklch(0.78 0.11 330);
	--lang-markdown: #6a6b73;

	--font-ui: 'Space Grotesk', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-ui);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* Grain sits under the content but over the canvas */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	opacity: 0.07;
	pointer-events: none;
	background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22220%22 height=%22220%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.85%22 numOctaves=%222%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E');
}

main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
	margin: 0;
}

img {
	max-width: 100%;
}

::selection {
	background: var(--accent-soft);
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.link {
	color: var(--accent);
}

.link:hover {
	color: var(--accent-hover);
}


.h-hero {
	font-size: 92px;
	font-weight: 600;
	letter-spacing: -3.5px;
	line-height: 0.98;
}

.h-gone {
	font-size: 56px;
	font-weight: 600;
	letter-spacing: -2px;
}

.h-page {
	font-size: 44px;
	font-weight: 600;
	letter-spacing: -1.6px;
}

.h-page-sm {
	font-size: 40px;
	font-weight: 600;
	letter-spacing: -1.4px;
}

.h-section {
	font-size: 32px;
	font-weight: 600;
	letter-spacing: -1px;
}

.h-section-lg {
	font-size: 36px;
	font-weight: 600;
	letter-spacing: -1.2px;
}

.h-bin {
	font-size: 34px;
	font-weight: 600;
	letter-spacing: -1px;
}

.h-bin-sm {
	font-size: 30px;
	font-weight: 600;
	letter-spacing: -0.8px;
}

.h-card {
	font-size: 17px;
	font-weight: 600;
}

.lead {
	font-size: 19px;
	line-height: 1.5;
	color: var(--muted);
	text-wrap: pretty;
}

.body {
	font-size: 15px;
	line-height: 1.6;
	color: var(--muted);
}

.mono {
	font-family: var(--font-mono);
}

.meta {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--dim);
}

.hint {
	font-size: 12px;
	color: var(--faint);
}

.th {
	font-family: var(--font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--dim);
}

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

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


.hero-brace {
	font-family: var(--font-mono);
	font-weight: 300;
	font-size: 200px;
	line-height: 0.8;
	color: var(--brace-ghost);
}


.logo {
	display: inline-flex;
	gap: 7px;
	font-family: var(--font-mono);
	font-weight: 800;
	font-size: 18px;
	color: var(--text);
}

.logo .brace {
	color: var(--accent);
}


.header {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 18px 32px;
	border-bottom: 1px solid var(--border-soft);
}

.header-home {
	padding: 22px 40px;
	border-bottom: 0;
}

.header-home .logo {
	font-size: 19px;
}

.header-minimal {
	display: flex;
	justify-content: space-between;
	border-bottom: 0;
}

.back {
	font-size: 14px;
	color: var(--muted);
}

.back:hover {
	color: var(--text);
}

.nav-pill {
	display: flex;
	gap: 4px;
	padding: 4px;
	font-size: 14px;
	background: var(--nav-track);
	border: 1px solid var(--border-tab);
	border-radius: 10px;
}

.nav-pill a,
.nav-menu nav a {
	padding: 6px 14px;
	border-radius: 7px;
	color: var(--muted);
}

.header-home .nav-pill a {
	padding: 7px 14px;
}

.nav-pill a:hover,
.nav-menu nav a:hover {
	color: var(--text);
}

.nav-pill a.active,
.nav-menu nav a.active {
	color: var(--text);
	background: var(--surface-active);
}

.nav-menu {
	display: none;
	position: relative;
	font-size: 14px;
}

.nav-menu summary {
	list-style: none;
	padding: 6px 12px;
	border: 1px solid var(--border-tab);
	border-radius: 8px;
	background: var(--nav-track);
	color: var(--text-2);
	cursor: pointer;
}

.nav-menu summary::-webkit-details-marker {
	display: none;
}

.nav-menu nav {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 160px;
	padding: 4px;
	background: var(--nav-track);
	border: 1px solid var(--border-tab);
	border-radius: 10px;
}

.header-url {
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--dim);
}

.header-url span {
	color: var(--accent);
}

.header-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
	font-size: 14px;
	white-space: nowrap;
}

.header-actions .login {
	color: var(--text-2);
}

.header-actions .login:hover {
	color: var(--text);
}

.header-home .header-actions .btn-sm {
	padding: 8px 14px;
}

.account {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text-2);
}

.avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: var(--s, 30px);
	height: var(--s, 30px);
	border-radius: 50%;
	overflow: hidden;
	background: var(--surface-avatar);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: calc(var(--s, 30px) * 0.43);
	line-height: 1;
}

.avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}


.footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 22px 40px;
	border-top: 1px solid var(--border-soft);
	font-size: 13px;
	color: var(--faint);
}

.footer-logo {
	font-family: var(--font-mono);
	font-weight: 700;
	color: var(--muted);
}

.footer nav {
	display: flex;
	align-items: center;
	gap: 24px;
}

.footer nav a {
	color: var(--dim);
}

.footer nav a:hover {
	color: var(--text);
}


.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 1px solid transparent;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	white-space: nowrap;
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-lg {
	padding: 14px 27px;
	font-size: 16px;
	border-radius: 10px;
}

.btn-md {
	padding: 11px 21px;
	font-size: 15px;
	border-radius: 10px;
}

.btn-sm {
	padding: 7px 14px;
	font-size: 14px;
	border-radius: 8px;
}

.btn-xs {
	padding: 8px 13px;
	font-family: var(--font-mono);
	font-size: 13px;
	font-weight: 500;
	border-radius: 8px;
}

.btn-block {
	display: flex;
	width: 100%;
}

.btn-primary {
	background: var(--accent);
	color: var(--on-accent);
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
	filter: brightness(1.07);
	color: var(--on-accent);
}

.btn-primary.btn-xs {
	font-weight: 700;
}

.btn-ghost {
	background: var(--surface);
	border-color: var(--border-input);
	color: var(--text-2);
	font-weight: 400;
}

.btn-ghost:hover {
	border-color: var(--border-input-hover);
	color: var(--text);
}

.btn-light {
	background: var(--text);
	color: var(--bg);
}

.btn-light:hover {
	filter: brightness(0.92);
}

.btn-danger {
	background: var(--danger);
	color: var(--text);
}

.btn-danger:hover {
	filter: brightness(1.08);
}

.btn-discord {
	background: var(--discord);
	color: var(--on-discord);
}

.btn-discord:hover {
	filter: brightness(1.07);
}


.kbd {
	display: inline-block;
	padding: 1px 7px;
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 1.5;
	color: var(--text-2);
	border: 1px solid var(--border-kbd);
	border-bottom-width: 2px;
	border-radius: 5px;
}


.seg {
	display: inline-flex;
	background: var(--surface-raised);
	border: 1px solid var(--border-input);
}

.seg-opt {
	border: 0;
	background: transparent;
	color: var(--dim);
}

.seg-opt:hover {
	color: var(--text-2);
}

.seg-opt[aria-pressed='true'] {
	background: var(--surface-seg);
	color: var(--text);
}

.seg-sm {
	padding: 2px;
	border-radius: 7px;
}

.seg-sm .seg-opt {
	padding: 4px 9px;
	font-size: 12px;
	border-radius: 5px;
}

.seg-lg {
	padding: 3px;
	border-radius: 9px;
}

.seg-lg .seg-opt {
	padding: 7px 14px;
	font-size: 14px;
	border-radius: 7px;
}


.panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: var(--surface-2);
	border: 1px solid var(--border-panel);
	border-radius: 14px;
	overflow: hidden;
}

.panel-float {
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.75);
}

.panel-bar {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	border-bottom: 1px solid var(--border-bar);
	background: var(--surface-bar);
}

.tabs {
	display: flex;
	min-width: 0;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 13px;
}

.tab {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
	padding: 12px 18px;
	border: 0;
	border-right: 1px solid var(--border-tab);
	background: transparent;
	color: var(--dim);
	font: inherit;
}

.tab:hover {
	color: var(--text-2);
}

.tab.active {
	background: var(--surface-2);
	color: var(--text);
	box-shadow: inset 0 2px 0 var(--accent);
}

.ficon {
	flex: none;
	vertical-align: -3px;
}

.panel-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--dim);
}

.panel-actions button {
	padding: 6px 11px;
	font-size: 12px;
	color: var(--text-2);
	background: var(--surface-raised);
	border: 1px solid var(--border-input);
	border-radius: 6px;
}

.panel-actions button:hover {
	border-color: var(--border-input-hover);
}

.panel-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--border-bar);
	background: var(--accent-strip);
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--muted);
}

.panel-body {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 18px 0;
	font-family: var(--font-mono);
	font-size: 14.5px;
	line-height: 1.85;
}

.lines {
	display: flex;
	flex-direction: column;
	min-width: max-content;
}

.line {
	display: grid;
	grid-template-columns: 64px 1fr;
}

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

.line .ln {
	padding-right: 22px;
	text-align: right;
	color: var(--line-num);
	user-select: none;
}

.line .code {
	min-height: 1.85em;
	padding-right: 24px;
	white-space: pre;
	color: var(--text-code);
}

.line:target,
.line.linked {
	background: var(--accent-soft);
	box-shadow: inset 2px 0 0 var(--accent);
}

.line:target .ln,
.line.linked .ln {
	color: var(--line-num-active);
}

.panel-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 12px 10px 18px;
	border-top: 1px solid var(--border-bar);
	background: var(--surface-bar);
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--dim);
}


.toasts {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	transform: translateX(-50%);
	pointer-events: none;
}

.toast {
	padding: 10px 16px;
	background: var(--surface);
	border: 1px solid var(--border-input);
	border-radius: 10px;
	box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
	font-family: var(--font-mono);
	font-size: 13px;
	color: var(--text);
	animation: toast-in 0.18s ease-out;
}

.toast.error {
	color: var(--danger-text);
}

.toast.out {
	opacity: 0;
	transition: opacity 0.25s;
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}


.cols-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

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

@media (max-width: 900px) {
	.header,
	.header-home {
		grid-template-columns: auto auto 1fr;
		gap: 16px;
		padding-inline: 20px;
	}

	.header-minimal {
		display: flex;
	}

	.nav-pill {
		display: none;
	}

	.nav-menu {
		display: block;
	}

	.header-url {
		display: none;
	}

	.footer {
		flex-direction: column;
		gap: 12px;
		padding-inline: 20px;
	}

	.h-hero {
		font-size: 56px;
	}

	.hero-brace {
		display: none;
	}

	.cols-2 {
		grid-template-columns: 1fr;
	}

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

	.panel-status {
		flex-wrap: wrap;
	}

	.header,
	.header-home {
		padding-block: 12px;
	}

	.logo,
	.header-actions .login,
	.account,
	.back {
		display: inline-flex;
		align-items: center;
		min-height: 40px;
	}

	.nav-menu summary,
	.nav-menu nav a {
		display: flex;
		align-items: center;
		min-height: 40px;
	}

	.header-home .nav-pill a,
	.btn-sm,
	.btn-xs,
	.header-home .header-actions .btn-sm {
		min-height: 40px;
	}

	.footer nav {
		gap: 8px;
	}

	.footer nav a {
		display: inline-flex;
		align-items: center;
		min-height: 40px;
		padding: 0 8px;
	}

	.seg-sm .seg-opt {
		padding: 11px 10px;
	}

	.seg-lg .seg-opt {
		padding: 11px 14px;
	}

	.panel-actions button {
		padding: 10px 12px;
	}
}

@media (max-width: 560px) {
	.header,
	.header-home {
		gap: 10px;
		padding-inline: 16px;
	}

	.header-actions {
		gap: 12px;
	}

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

	.h-page,
	.h-gone {
		font-size: 36px;
	}

	.panel-bar {
		flex-wrap: wrap;
	}

	.panel-bar > .tabs {
		flex: 1 0 100%;
	}

	.panel-actions {
		flex: 1 0 100%;
		flex-wrap: wrap;
		gap: 6px 8px;
		padding: 4px 12px;
		border-top: 1px solid var(--border-bar);
		white-space: nowrap;
	}
}
