/* breyngine.com: the colors of the editor and the logo (dark blue night, cyan to blue accent). */
:root {
	--bg: #0b1020;
	--bg2: #111832;
	--panel: #161f3d;
	--line: #263257;
	--text: #e7ecf7;
	--muted: #9aa6c3;
	--accent: #22b4ff;
	--accent2: #1e6bff;
	--when: #1f4f86;
	--if: #4a4d55;
	--do: #2a6a45;
	--radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
b { color: #fff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.accent { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 820px; }
.center .lead { margin-left: auto; margin-right: auto; }
section { padding: 72px 0; }
.band { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Header and menu (a checkbox opens it on phones, no script). */
.top { position: sticky; top: 0; z-index: 10; background: rgba(11, 16, 32, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand img { height: 40px; width: auto; }
nav { display: flex; gap: 22px; align-items: center; }
nav a { color: var(--muted); font-weight: 600; font-size: .98rem; }
nav a:hover, nav a.active { color: #fff; text-decoration: none; }
nav a.lang { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
#menu { display: none; }
.burger { display: none; cursor: pointer; width: 44px; height: 44px; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 10px; width: 24px; height: 2px; background: var(--text); content: ""; }
.burger span { top: 21px; }
.burger span::before { top: -7px; left: 0; }
.burger span::after { top: 7px; left: 0; }
@media (max-width: 860px) {
	.burger { display: block; }
	nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg2); border-bottom: 1px solid var(--line); }
	nav a { padding: 14px 20px; border-top: 1px solid var(--line); }
	nav a.lang { border-radius: 0; border: 0; border-top: 1px solid var(--line); padding: 14px 20px; }
	#menu:checked ~ nav { display: flex; }
}

/* Buttons. */
.ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0; }
.center .ctas { justify-content: center; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 12px; font-weight: 700; color: var(--text); border: 1px solid var(--line); background: var(--panel); }
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); border: 0; color: #fff; box-shadow: 0 8px 30px rgba(34, 140, 255, .35); }

/* Pictures. */
figure { margin: 28px 0; }
figcaption { color: var(--muted); font-size: .92rem; margin-top: 10px; font-style: italic; }
.screen img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.hero { padding-top: 64px; background: radial-gradient(ellipse at 70% -10%, rgba(34, 140, 255, .25), transparent 60%); }
.hero h1 { max-width: 900px; }

/* BreynFlow. */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 20px 0; }
.checks li { position: relative; padding-left: 30px; margin: 10px 0; color: var(--muted); }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.checks.inline { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.screen.rules { margin: 0 auto; max-width: 520px; }

/* On the phone. */
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 36px 0; }
.phone { margin: 0; text-align: center; }
.phone img { border-radius: 26px; border: 6px solid #1c2442; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); margin: 0 auto; max-height: 640px; width: auto; }
@media (max-width: 700px) {
	.phones { grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
	.phone { scroll-snap-align: center; }
}

/* Features. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 30px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { color: #fff; }
.card p { color: var(--muted); margin: 0; }

/* Tutorials. */
.tutorials { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; margin-top: 30px; }
.tcard { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.tcard:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); transition: .15s; }
.tcard img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #000; }
.tcard div { padding: 18px 20px 20px; }
.tcard p { color: var(--muted); font-size: .95rem; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .meta { color: var(--accent); font-weight: 700; font-size: .9rem; }
.page-head { padding-bottom: 0; }

/* A tutorial. */
.doc { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding-top: 40px; padding-bottom: 60px; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; font-size: .93rem; }
.toc summary { font-weight: 800; cursor: pointer; margin-bottom: 8px; }
.toc ol { padding-left: 30px; margin: 0 0 16px; }
.toc li { margin: 6px 0; color: var(--muted); }
.toc a { color: var(--muted); }
.toc a:hover { color: #fff; }
article { min-width: 0; max-width: 820px; }
article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.chapter { padding: 30px 0 10px; border-top: 1px solid var(--line); }
.chapter h2 { font-size: 1.7rem; }
.chapter .num { display: block; font-size: .85rem; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
article p, article li { color: #d6dcec; }
article figure img { border-radius: 10px; border: 1px solid var(--line); }
.tip { background: rgba(34, 140, 255, .1); border: 1px solid rgba(34, 140, 255, .35); border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.note { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; color: var(--muted); font-size: .95rem; }
.steps { margin: 16px 0; }
.step { display: flex; gap: 14px; margin: 14px 0; }
.step .n { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--accent2); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step div { flex: 1; min-width: 0; }
.back { margin-top: 40px; }
@media (max-width: 900px) {
	.doc { grid-template-columns: 1fr; gap: 10px; padding-top: 20px; }
	.toc { position: static; max-height: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
	.toc details:not([open]) summary { margin: 0; }
}

/* Footer and the language chooser. */
footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: .92rem; }
footer img { margin-bottom: 14px; height: 37px; width: auto; }
body.chooser { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
body.chooser img { margin: 0 auto; }
