/*
 * Levo help: the support pages at omggg.wtf/levo/help/. The Levo page's colours, type and navbar
 * (levo.css), with a plain reading layout. Light by default; html.dark (set in the head) switches it.
 */

:root {
	--page-max: 1120px;
	--side: clamp(16px, 4vw, 40px);
	--content: min(var(--page-max), calc(100vw - 2 * var(--side) - env(safe-area-inset-left) - env(safe-area-inset-right)));
	--read: 680px;
	--bg: #F7F7F7;
	--ink: 0 0 0;
	--text: #1D1D1F;
	--muted: #6B6B74;
	--card: rgba(0, 0, 0, 0.025);
	--rim: rgba(0, 0, 0, 0.08);
	--btn: #1D1D1F;
	--btn-text: #FFFFFF;
	--lit: #2C6BEA;
	--round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
	--win-r: 16px;
	--lift: 0 0.5px 1px rgba(0, 0, 0, 0.05), 0 4px 14px -6px rgba(0, 0, 0, 0.08), 0 22px 44px -22px rgba(0, 0, 0, 0.16);
	color-scheme: light;
}
html.dark {
	--bg: #070707;
	--ink: 255 255 255;
	--text: #F0F0F0;
	--muted: #8E8E96;
	--card: rgba(255, 255, 255, 0.03);
	--rim: rgba(255, 255, 255, 0.08);
	--btn: #F0F0F0;
	--btn-text: #070707;
	--lit: #6F9CFF;
	--lift: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.5), 0 22px 44px -22px rgba(0, 0, 0, 0.9);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
	background: var(--bg);
	color: var(--text);
	font-family: var(--round);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
::selection { background: rgba(0, 178, 255, 0.3); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid #00B2FF; outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }

/* The navbar: the Levo page's, with Help beside the brand. */
.nav { position: sticky; top: 0; z-index: 80; height: calc(64px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); transition: background-color .25s, box-shadow .25s, -webkit-backdrop-filter .25s, backdrop-filter .25s; }
.nav.is-scrolled {
	background: color-mix(in srgb, var(--bg) 72%, transparent);
	-webkit-backdrop-filter: blur(20px) saturate(1.6);
	backdrop-filter: blur(20px) saturate(1.6);
	box-shadow: 0 1px 0 var(--rim);
}
.nav-in { width: var(--content); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 28px; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.nav-brand img { display: block; border-radius: 6px; }
.nav-link { font-size: 15px; font-weight: 600; color: var(--muted); transition: color .15s; }
.nav-link:hover, .nav-link[aria-current] { color: var(--text); }
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 34px; padding: 0 14px; border-radius: 10px;
	background: var(--btn); color: var(--btn-text);
	font-size: 14px; font-weight: 600; white-space: nowrap;
	transition: transform .15s;
}
.btn:hover { transform: scale(1.03); }
.nav .btn { margin-left: auto; }

/* The hub */
.hub { width: var(--content); margin: 0 auto; padding: 56px 0 0; }
.hub h1 { font-size: clamp(40px, 6vw, 64px); max-width: 14ch; }
.search { display: block; width: 100%; max-width: 480px; height: 48px; margin-top: 32px; padding: 0 16px; border: 0; border-radius: 13px; background: rgb(var(--ink) / 0.06); color: var(--text); font: inherit; font-size: 16px; }
.search::placeholder { color: var(--muted); }
.search:focus-visible { outline: 2px solid #00B2FF; outline-offset: 2px; }
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 48px 32px; margin-top: 64px; }
.sections h2 { font-size: 22px; letter-spacing: -0.02em; }
.sections ul { list-style: none; margin: 14px 0 0; padding: 0; }
.sections li + li { margin-top: 2px; }
.sections a { display: block; padding: 7px 0; color: var(--muted); font-size: 16px; line-height: 1.35; transition: color .15s; }
.sections a:hover { color: var(--text); }
.sections [hidden], .none[hidden] { display: none; }
.none { margin-top: 48px; color: var(--muted); }

/* An article */
.art { width: min(var(--read), var(--content)); margin: 0 auto; padding: 56px 0 0; }
.crumb { font-size: 14px; color: var(--muted); }
.art .crumb a { color: inherit; }
.crumb a:hover { color: var(--text); text-decoration: none; }
.art h1 { margin-top: 14px; font-size: clamp(34px, 5vw, 48px); line-height: 1.08; }
.art h2 { margin-top: 48px; font-size: 24px; letter-spacing: -0.02em; }
.art h3 { margin-top: 32px; font-size: 18px; letter-spacing: -0.01em; }
.art p, .art ul, .art ol, .art figure, .art .note { margin-top: 16px; }
.art h1 + p { margin-top: 24px; font-size: 20px; line-height: 1.45; color: var(--muted); }
.art ul, .art ol { padding-left: 1.4em; }
.art li + li { margin-top: 6px; }
.art a { color: var(--lit); }
.art a:hover { text-decoration: underline; text-underline-offset: 3px; }
.art kbd, .art code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: rgb(var(--ink) / 0.07); }
.art kbd { box-shadow: inset 0 -1px 0 rgb(var(--ink) / 0.12); }
.art pre { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; background: rgb(var(--ink) / 0.06); overflow-x: auto; }
.art pre code { padding: 0; background: none; font-size: 14px; }
.art .note { padding: 14px 18px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rim); }
.art table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 16px; }
.art th, .art td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rim); text-align: left; vertical-align: top; }
.art th { font-weight: 700; }
.art figure { margin-left: 0; margin-right: 0; }
.art figure img { display: block; width: 100%; height: auto; border-radius: var(--win-r); box-shadow: var(--lift); }
.art figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.related { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--rim); }
.related h2 { margin-top: 0; font-size: 18px; }
.related ul { list-style: none; margin: 12px 0 0; padding: 0; }
.related a { display: block; padding: 6px 0; }

/* The footer: the Levo page's links. */
.foot { margin-top: 120px; padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }
.lf-links { width: var(--content); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 13px; color: var(--muted); }
.lf-links a { color: inherit; transition: color .15s; }
.lf-links a:hover { color: var(--text); }
.lf-copy { margin-left: auto; }

@media (max-width: 760px) {
	.nav { height: calc(56px + env(safe-area-inset-top)); }
	.nav-in { gap: 20px; }
	.hub, .art { padding-top: 32px; }
	.sections { margin-top: 48px; gap: 40px; }
	.foot { margin-top: 80px; }
}

/* The date and source of a comparison, quiet at the end of the page. */
.art .fine { margin-top: 40px; font-size: 12px; line-height: 1.5; color: var(--muted); opacity: .7; }
