/* Gym Builder documentation — one stylesheet for every page. */
:root {
	--ink: #0f172a;
	--ink-2: #1f2a44;
	--muted: #5d7290;
	--line: #e3eaf3;
	--bg: #f7f9fc;
	--brand: #005dd0;
	--brand-2: #0e4ec1;
	--brand-dark: #08367a;
	--brand-tint: rgba(0, 93, 208, 0.09);
	--ok: #1aa874;
	--ok-bg: #e8f8f1;
	--ok-line: #bce7d3;
	--warn: #b45309;
	--warn-bg: #fff7e6;
	--warn-line: #fcd9a0;
	--white: #ffffff;
	--shadow: 0 12px 30px -18px rgba(15, 23, 42, 0.22);
	--radius: 14px;
	--top: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 16px); }
body {
	margin: 0;
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
	color: var(--ink-2);
	background: var(--white);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
code {
	font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
	font-size: 0.9em;
	background: #eef3fb;
	color: var(--brand-dark);
	padding: 2px 7px;
	border-radius: 5px;
	overflow-wrap: anywhere;
}
pre { background: #0b1428; color: #dbe7ff; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
pre code { background: none; color: inherit; padding: 0; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 27px; margin-top: 52px; padding-top: 18px; border-top: 1px solid var(--line); }
h3 { font-size: 20px; margin-top: 32px; }
h4 { font-size: 16px; margin-top: 22px; color: var(--brand-2); }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }

/* ── top bar ─────────────────────────────────────────────── */
.topbar {
	position: sticky; top: 0; z-index: 50;
	height: var(--top);
	display: flex; align-items: center; gap: 14px;
	padding: 0 20px;
	background: var(--white);
	border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 17px; text-decoration: none; }
.topbar .brand .logo {
	width: 34px; height: 34px; border-radius: 9px;
	background: linear-gradient(135deg, var(--brand), var(--brand-dark));
	color: #fff; display: flex; align-items: center; justify-content: center;
}
.topbar .brand .logo svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar .brand small { font-weight: 600; color: var(--muted); font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar .ext { font-size: 14px; font-weight: 600; }
.menu-btn {
	display: none;
	border: 1px solid var(--line); background: var(--white); border-radius: 10px;
	width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.menu-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── page layout: guide list | content | contents ───────── */
.shell {
	max-width: 1440px; margin: 0 auto;
	display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 40px;
	padding: 0 24px;
}
.sidebar {
	position: sticky; top: var(--top);
	height: calc(100vh - var(--top)); overflow-y: auto;
	padding: 28px 4px 40px 0;
	border-right: 1px solid var(--line);
}
.sidebar h5, .toc h5 {
	margin: 18px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
	text-transform: uppercase; color: var(--muted);
}
.sidebar h5:first-child, .toc h5:first-child { margin-top: 0; }
.sidebar ul, .toc ul { list-style: none; padding: 0; margin: 0; }
.sidebar a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 7px 12px; margin: 1px 12px 1px 0; border-radius: 8px;
	font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.sidebar a:hover { background: var(--brand-tint); color: var(--brand-2); }
.sidebar a[aria-current="page"] { background: var(--brand); color: #fff; }
.sidebar .tag { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-2); }
.sidebar a[aria-current="page"] .tag { background: rgba(255, 255, 255, 0.22); color: #fff; }
.sidebar .tag.free { background: var(--ok-bg); color: var(--ok); }

.content { min-width: 0; padding: 36px 0 90px; }
.toc {
	position: sticky; top: var(--top);
	max-height: calc(100vh - var(--top)); overflow-y: auto;
	padding: 36px 0 40px;
}
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); font-size: 13.5px; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--brand-2); }
.toc a.is-active { color: var(--brand-2); border-left-color: var(--brand); font-weight: 600; }
.toc .sub a { padding-left: 24px; font-size: 13px; }

/* ── page hero ───────────────────────────────────────────── */
.hero { padding: 6px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.hero .eyebrow {
	display: inline-flex; gap: 8px; align-items: center;
	font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--brand-2); background: var(--brand-tint); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: 38px; margin-bottom: 10px; }
.hero + h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.hero .lead { font-size: 17.5px; color: var(--muted); max-width: 760px; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.facts span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }

/* ── building blocks ─────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0 22px; }
.steps > li { position: relative; padding: 8px 0 10px 46px; }
.steps > li::before {
	counter-increment: step; content: counter(step);
	position: absolute; left: 0; top: 7px; width: 30px; height: 30px; border-radius: 50%;
	background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 13px;
}
.bullets { list-style: none; padding: 0; margin: 12px 0 20px; }
.bullets > li { position: relative; padding: 5px 0 5px 24px; }
.bullets > li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.path {
	display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px;
	font-size: 0.92em; font-weight: 700; color: var(--ink);
	background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 1px 8px;
}
.path i { font-style: normal; color: var(--muted); font-weight: 500; }
.btn-name { font-weight: 700; color: var(--ink); white-space: nowrap; }
.callout { display: flex; gap: 14px; padding: 15px 18px; border-radius: 12px; margin: 18px 0 22px; border: 1px solid var(--line); background: var(--bg); }
.callout .ico { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; background: var(--brand-tint); color: var(--brand-2); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.callout > div > :last-child { margin-bottom: 0; }
.callout b.t { display: block; color: var(--ink); margin-bottom: 2px; }
.callout.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.callout.ok .ico { background: var(--ok-line); color: var(--ok); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout.warn .ico { background: var(--warn-line); color: var(--warn); }
figure.shot { margin: 18px 0 26px; }
figure.shot img { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
figure.shot.phone img { max-width: 360px; }
figure.shot figcaption { font-size: 13.5px; color: var(--muted); margin-top: 9px; }
.table-wrap { overflow-x: auto; margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 12px; }
table.ref { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.ref th, table.ref td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ref th { background: var(--bg); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.ref tr:last-child td { border-bottom: 0; }
table.ref td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
details.faq { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin: 10px 0; background: #fff; }
details.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; color: var(--ink); }
details.faq[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 18px 0 30px; }
.card {
	display: flex; gap: 14px; align-items: flex-start;
	padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; box-shadow: var(--shadow); color: inherit; text-decoration: none;
}
.card:hover { border-color: var(--brand); text-decoration: none; }
.card .ico {
	width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
	background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff;
	display: flex; align-items: center; justify-content: center;
}
.card .ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .nm, .card .desc { display: block; }
.card .nm { font-weight: 800; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; line-height: 1.3; }
.card .desc { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.card .tag { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; padding: 2px 8px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-2); }
.card .tag.free { background: var(--ok-bg); color: var(--ok); }
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--line); }
.pager a { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.pager a small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.pager a.next { text-align: right; }
.site-footer { border-top: 1px solid var(--line); padding: 26px 24px 34px; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ── smaller screens ─────────────────────────────────────── */
@media (max-width: 1200px) {
	.shell { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
	.toc { display: none; }
}
@media (max-width: 900px) {
	.menu-btn { display: inline-flex; }
	.topbar .ext { display: none; }
	.shell { display: block; padding: 0 16px; }
	.sidebar {
		position: fixed; top: var(--top); left: 0; z-index: 40;
		width: 290px; max-width: 86vw; height: calc(100vh - var(--top));
		background: var(--white); padding: 20px 8px 40px 16px;
		transform: translateX(-102%); transition: transform 0.2s ease; box-shadow: var(--shadow);
	}
	body.nav-open .sidebar { transform: none; }
	.content { padding-top: 24px; }
	.hero h1 { font-size: 30px; }
	h2 { font-size: 23px; margin-top: 40px; }
	.pager { flex-direction: column; }
	/* A long name in the first column may wrap here, so the other columns keep their room. */
	table.ref td:first-child { white-space: normal; min-width: 7.5em; }
	table.ref th, table.ref td { padding: 9px 11px; }
}
