/* IPchk.sh: onyx ground, #23B998 accent, JetBrains Mono */

@font-face {
	font-family: "JetBrains Mono";
	src: url("/fonts/jetbrains-mono.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--bg: #0f1011;
	--surface: #17181a;
	--raised: #1f2022;
	--term: #0a0a0b;
	--ink: #eceef0;
	--body: #c3c8cc;
	--muted: #959ba1;
	--faint: #6b7177;
	--acc: #23b998;
	--acc-hi: #4fcbae;
	--acc-ink: #04161a;
	--acc-tint: rgba(35, 185, 152, 0.1);
	--acc-line: rgba(35, 185, 152, 0.4);
	--line: rgba(255, 255, 255, 0.08);
	--line-soft: rgba(255, 255, 255, 0.05);
	--line-strong: rgba(255, 255, 255, 0.14);
	--err: #ec5b59;
	--err-tint: rgba(236, 91, 89, 0.07);
	--err-line: rgba(236, 91, 89, 0.45);
	--warn: #f2c45a;
	--warn-tint: rgba(242, 196, 90, 0.06);
	--warn-line: rgba(242, 196, 90, 0.38);
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--bg);
	color: var(--body);
	font-family: var(--mono);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

main { flex: 1 0 auto; }

a { color: var(--acc); }
a:hover { color: var(--acc-hi); }

button { font-family: inherit; }

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

[hidden] { display: none !important; }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 40px;
}

.icon { display: block; flex-shrink: 0; }

/* Header and footer ----------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--line); }

.site-header .wrap {
	height: 64px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.brand-name {
	font-size: 17px;
	line-height: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.brand-tld { font-weight: 400; color: var(--muted); }

/* Sixteen octets (IPv6), four lit (IPv4) */
.mark .o { fill: var(--ink); fill-opacity: 0.5; }
.mark .o.on { fill: var(--acc); fill-opacity: 1; }

.nav {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.nav a {
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	border-radius: 4px;
	font-size: 13px;
	color: var(--body);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a:hover, .nav a[aria-current="page"] { background-color: var(--acc-tint); color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }

.site-footer .wrap {
	padding-top: 32px;
	padding-bottom: 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px 24px;
	flex-wrap: wrap;
}

.footer-left {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.footer-left .brand-name { font-size: 14px; }

.small { font-size: 12.5px; line-height: 18px; color: var(--muted); }

.df-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
}

.df-link img { display: block; height: 14px; width: auto; }

/* Buttons and fields ---------------------------------------------------- */

.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 42px;
	padding: 0 16px;
	border: 0;
	border-radius: 4px;
	background-color: var(--acc);
	color: var(--acc-ink);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.btn-primary:hover { background-color: var(--acc-hi); color: var(--acc-ink); }

.btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--line-strong);
	border-radius: 4px;
	background-color: transparent;
	color: var(--body);
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
	background-color: var(--acc-tint);
	border-color: var(--acc-line);
	color: var(--ink);
}

.btn-copy { height: 40px; padding: 0 12px; font-size: 12.5px; flex-shrink: 0; }
.btn-copy.is-copied .icon { color: var(--acc); }

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border: 1px solid transparent;
	border-radius: 4px;
	background-color: transparent;
	color: var(--muted);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover { background-color: var(--acc-tint); border-color: var(--acc-line); color: var(--ink); }
.icon-btn.is-copied { color: var(--acc); }

.lookup { display: flex; flex-direction: column; gap: 10px; margin: 0; }

.field-label { font-size: 12.5px; line-height: 16px; font-weight: 500; color: var(--muted); }

.field {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 52px;
	padding: 0 5px 0 0;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background-color: var(--surface);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 3px var(--acc-tint); }
.field.is-invalid { border-color: var(--err-line); }

.field input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: 0;
	background-color: transparent;
	padding: 0 16px;
	font-family: var(--mono);
	font-size: 15px;
	color: var(--ink);
}

.field input::placeholder { color: var(--faint); }

.field .prompt { padding-left: 16px; }
.field .prompt + input { padding-left: 10px; }

.help { min-height: 20px; }

.help-line {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-size: 12.5px;
	line-height: 19px;
}

.help-line .icon { margin-top: 2.5px; }
.help-line.is-error { color: var(--err); }
.help-line.is-ok { color: var(--muted); }
.help-line.is-ok .icon { color: var(--acc); }
.help-line a { color: var(--ink); }

.examples {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.pill {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 10px;
	border: 1px solid var(--line-strong);
	border-radius: 4px;
	font-size: 12px;
	color: var(--ink);
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pill:hover { background-color: var(--acc-tint); border-color: var(--acc-line); color: var(--ink); }

/* Hero ------------------------------------------------------------------ */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.hero > .wrap {
	position: relative;
	padding-top: 64px;
	padding-bottom: 56px;
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.hero-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 440px;
	gap: 48px;
	align-items: end;
}

.hero-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.eyebrow {
	font-size: 12.5px;
	line-height: 16px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--acc);
}

.title {
	margin: 0;
	font-size: 40px;
	line-height: 46px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.cursor {
	display: inline-block;
	width: 0.55em;
	height: 0.9em;
	margin-left: 0.18em;
	vertical-align: -0.06em;
	background-color: var(--acc);
	animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.lead { margin: 0; max-width: 600px; font-size: 15px; line-height: 25px; }

.rain {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 80%);
	mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 80%);
}

.rain span {
	position: absolute;
	top: 0;
	display: block;
	font-size: 13px;
	line-height: 17px;
	text-align: center;
	white-space: pre;
	color: var(--acc);
	will-change: transform;
	animation: fall linear infinite;
}

.rain span b { display: block; font-weight: 400; color: var(--ink); }

@keyframes fall {
	from { transform: translateY(-100%); }
	to { transform: translateY(var(--fall, 720px)); }
}

/* Address cards --------------------------------------------------------- */

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

.card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 8px;
	background-color: var(--surface);
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.card:hover { border-color: var(--line-strong); }
.card.is-empty { border-style: dashed; border-color: var(--line-strong); background-color: transparent; }
.card.is-failed { border-color: var(--err-line); }

.card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 48px;
	padding: 0 20px;
	border-bottom: 1px solid var(--line-soft);
}

.card-title {
	margin: 0;
	font-size: 13px;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--ink);
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 22px;
	padding: 0 8px;
	border: 1px solid var(--line-strong);
	border-radius: 4px;
	font-size: 11.5px;
	line-height: 14px;
	color: var(--muted);
	white-space: nowrap;
}

.badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 1px;
	border: 1px solid currentColor;
}

.badge.is-ok { border-color: var(--acc-line); background-color: var(--acc-tint); color: var(--acc); }
.badge.is-ok::before { background-color: var(--acc); border-color: var(--acc); }
.badge.is-err { border-color: var(--err-line); background-color: var(--err-tint); color: var(--err); }
.badge.is-wait::before { animation: blink 1.1s steps(1) infinite; }

.via { margin-left: auto; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }

.addr-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 26px 20px 22px;
	min-height: 40px;
}

.addr {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 34px;
	line-height: 40px;
	font-weight: 500;
	letter-spacing: -0.02em;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.addr.is-long { font-size: 24px; line-height: 32px; }

.dl {
	display: grid;
	grid-template-columns: 128px minmax(0, 1fr);
	margin: 0 20px 6px;
	font-size: 13px;
	line-height: 20px;
}

.dl dt { padding: 12px 0; border-top: 1px solid var(--line-soft); color: var(--muted); }

.dl dd {
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid var(--line-soft);
	color: var(--ink);
	overflow-wrap: anywhere;
	min-width: 0;
}

.dl dd.is-muted, .is-muted { color: var(--muted); }
.dl dd.acc { color: var(--acc); }

.with-flag { display: flex; align-items: center; gap: 9px; }
.flag { display: block; flex-shrink: 0; width: 21px; height: 15px; }

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

.card-msg {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	padding: 26px 20px 24px;
}

.msg-title { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--ink); }
.card.is-empty .msg-title { font-size: 30px; line-height: 38px; font-weight: 500; color: var(--faint); }
.card-msg p { margin: 0; max-width: 480px; font-size: 13px; line-height: 21px; }

.skel {
	display: block;
	height: 12px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--raised) 0%, rgba(255, 255, 255, 0.08) 50%, var(--raised) 100%);
	background-size: 200% 100%;
	animation: shimmer 1.6s linear infinite;
}

.skel.is-addr { height: 32px; width: 62%; margin: 4px 0; }
.skel.w72 { width: 72%; margin: 4px 0; }
.skel.w58 { width: 58%; margin: 4px 0; }
.skel.w44 { width: 44%; margin: 4px 0; }

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }

.strip {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 15px 20px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background-color: var(--surface);
	font-size: 13px;
	line-height: 20px;
}

.strip strong { font-weight: 700; color: var(--ink); white-space: nowrap; }
.strip .icon { color: var(--acc); }
.strip .icon .lo { fill: currentColor; }
.strip.is-v4 .icon .lo { fill: transparent; }

/* Sections -------------------------------------------------------------- */

.section { padding: 64px 0 72px; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }

.section > .wrap { display: flex; flex-direction: column; gap: 28px; }

.sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.sec-head > div:not(.seg) { display: flex; flex-direction: column; gap: 8px; }

.sec-title {
	margin: 0;
	font-size: 24px;
	line-height: 30px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.sec-lead { margin: 0; font-size: 14px; line-height: 22px; }

.seg {
	display: inline-flex;
	padding: 3px;
	gap: 3px;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background-color: var(--surface);
	max-width: 100%;
}

.seg button {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	height: 38px;
	padding: 0 14px;
	min-width: 0;
	border: 0;
	border-radius: 4px;
	background-color: transparent;
	color: var(--body);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.seg button[aria-pressed="true"] { background-color: var(--acc); color: var(--acc-ink); }
.seg button:disabled { color: var(--faint); cursor: not-allowed; }
.seg .sub { font-weight: 400; opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }

.panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 8px;
	background-color: var(--surface);
	overflow: hidden;
}

.panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 50px;
	padding: 0 20px;
	border-bottom: 1px solid var(--line);
}

.panel-title {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 18px;
	font-weight: 700;
	color: var(--ink);
}

.panel-title .icon { color: var(--acc); }
.panel-src { font-size: 12px; line-height: 16px; color: var(--muted); }

.panel .dl { grid-template-columns: 150px minmax(0, 1fr); margin: 0 20px 4px; }
.panel .dl dt, .panel .dl dd { padding: 11px 0; }
.panel .dl dt:first-child, .panel .dl dt:first-child + dd { border-top: 0; }

.note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 14px 20px;
	border-top: 1px solid var(--line);
	background-color: var(--bg);
	font-size: 12.5px;
	line-height: 19px;
	color: var(--muted);
}

.note .icon { margin-top: 2px; }

.notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 6px 20px 20px;
	padding: 14px 16px;
	border: 1px solid var(--warn-line);
	border-radius: 6px;
	background-color: var(--warn-tint);
	font-size: 12.5px;
	line-height: 19px;
}

.notice .icon { margin-top: 1.5px; color: var(--warn); }
.notice strong { color: var(--ink); }

.notice-block { flex-direction: column; gap: 12px; margin: 20px; padding: 18px; }
.notice-block .notice-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.notice-block p { margin: 0; font-size: 13px; line-height: 21px; }

.empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 28px 24px 30px;
}

.empty .icon { color: var(--muted); }
.empty strong { font-size: 15px; line-height: 22px; color: var(--ink); }
.empty p { margin: 0; max-width: 460px; font-size: 13px; line-height: 21px; }

/* Terminal -------------------------------------------------------------- */

.term-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

.term {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background-color: var(--term);
	overflow: hidden;
}

.term-bar {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 46px;
	padding: 0 8px;
	border-bottom: 1px solid var(--line);
	background-color: var(--surface);
}

.term-tab {
	height: 32px;
	padding: 0 12px;
	border: 0;
	border-radius: 4px;
	background-color: transparent;
	color: var(--muted);
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}

.term-tab[aria-pressed="true"] { background-color: var(--acc-tint); color: var(--acc); }
.term-note { margin-left: auto; padding-right: 8px; font-size: 12px; color: var(--muted); }

.term-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 0 20px;
	font-size: 13.5px;
	line-height: 22px;
	min-height: 200px;
}

.term-cmd {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 32px;
	padding: 0 12px 0 20px;
}

.term-cmd + .term-out + .term-cmd { margin-top: 10px; }
.term-cmd code { flex: 1 1 auto; min-width: 0; font-family: inherit; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt { color: var(--acc); }
.term-out { padding: 0 20px 0 42px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--body); }
.term-out.is-muted { color: var(--muted); }

.side {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: 8px;
	background-color: var(--surface);
	overflow: hidden;
}

.side h3 {
	margin: 0;
	padding: 15px 20px;
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	line-height: 18px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--ink);
}

.side dl + h3 { border-top: 1px solid var(--line); }

.side dl {
	display: grid;
	grid-template-columns: 116px minmax(0, 1fr);
	margin: 0;
	padding: 6px 20px 12px;
	font-size: 12.5px;
	line-height: 19px;
}

.side dt { padding: 8px 0; color: var(--ink); }
.side dt.acc { color: var(--acc); }
.side dd { margin: 0; padding: 8px 0; }

.more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 15px 20px;
	border-top: 1px solid var(--line);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

/* About ----------------------------------------------------------------- */

.about {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border: 1px solid var(--line);
	border-radius: 8px;
	background-color: var(--surface);
	overflow: hidden;
}

.about > div { display: flex; flex-direction: column; gap: 12px; padding: 28px 32px; }
.about > div + div { border-left: 1px solid var(--line); }
.about h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 700; color: var(--ink); }
.about p { margin: 0; font-size: 13.5px; line-height: 23px; }
.about p.small { font-size: 12.5px; line-height: 20px; }
.about a { text-decoration: none; }

/* Lookup page ----------------------------------------------------------- */

.bar { border-bottom: 1px solid var(--line); background-color: var(--surface); }

.bar .wrap {
	padding-top: 20px;
	padding-bottom: 20px;
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.bar .btn-secondary { height: 48px; flex-shrink: 0; }
.bar .lookup { flex: 1 1 auto; min-width: 0; gap: 8px; }
.bar .field { height: 48px; background-color: var(--bg); }
.bar .help { min-height: 0; }

.result { padding: 48px 0 80px; }
.result > .wrap { display: flex; flex-direction: column; gap: 28px; }
.result-head { display: flex; flex-direction: column; gap: 14px; }
.result-addr-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.result-addr-row .title { min-width: 0; }

.result-meta {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 14px;
	line-height: 22px;
}

.result-meta .sep { color: var(--faint); }

.cmdline {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 18px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background-color: var(--term);
	font-size: 13px;
	line-height: 20px;
}

.cmdline code { flex: 1 1 auto; min-width: 0; font-family: inherit; color: var(--ink); overflow-wrap: anywhere; }

.alert-box {
	width: 100%;
	max-width: 680px;
	border: 1px solid var(--warn-line);
	border-radius: 8px;
	background-color: var(--surface);
	overflow: hidden;
}

.alert-box.is-error { border-color: var(--err-line); }
.alert-box .alert-body { display: flex; flex-direction: column; gap: 12px; padding: 24px 26px 22px; }

.alert-box h1, .alert-box h2 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 17px;
	line-height: 24px;
	font-weight: 700;
	color: var(--ink);
}

.alert-box h1 .icon, .alert-box h2 .icon { color: var(--warn); }
.alert-box.is-error h1 .icon, .alert-box.is-error h2 .icon { color: var(--err); }
.alert-box p { margin: 0; font-size: 13.5px; line-height: 22px; }
.alert-box .alert-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 26px 20px; border-top: 1px solid var(--line); }

/* API page -------------------------------------------------------------- */

.doc > .wrap {
	padding-top: 56px;
	padding-bottom: 88px;
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	align-items: flex-start;
}

.toc {
	flex: 1 1 200px;
	max-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 6px;
	position: sticky;
	top: 24px;
}

.toc .toc-label { margin-bottom: 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.toc a {
	padding: 7px 0 7px 14px;
	border-left: 1px solid var(--line);
	font-size: 13px;
	color: var(--body);
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover, .toc a[aria-current="location"] { color: var(--ink); border-color: var(--acc); }

.doc-body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.doc-body > header, .doc-body > section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.doc-body h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.doc-body p { margin: 0; font-size: 14px; line-height: 23px; }
.doc-body p.small { font-size: 12.5px; line-height: 20px; }

.table-box { border: 1px solid var(--line); border-radius: 8px; background-color: var(--surface); overflow-x: auto; }

.tbl { width: 100%; border-collapse: collapse; }

.tbl th {
	padding: 12px 18px;
	border-bottom: 1px solid var(--line);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: left;
	color: var(--muted);
	white-space: nowrap;
}

.tbl td {
	padding: 12px 18px;
	border-top: 1px solid var(--line-soft);
	font-size: 13px;
	line-height: 20px;
	vertical-align: top;
}

.tbl tr:first-child td { border-top: 0; }
.tbl td code { font-family: inherit; color: var(--ink); overflow-wrap: anywhere; }
.tbl .ep { white-space: nowrap; color: var(--ink); }
.tbl .ep .verb { color: var(--muted); }
.tbl .k { color: var(--acc); }
.tbl .ink { color: var(--ink); }
.tbl .s-err { color: var(--err); white-space: nowrap; }
.tbl .s-warn { color: var(--warn); white-space: nowrap; }

.code-box { border: 1px solid var(--line-strong); border-radius: 8px; background-color: var(--term); overflow: hidden; }

.code-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 42px;
	padding: 0 8px 0 16px;
	border-bottom: 1px solid var(--line);
	background-color: var(--surface);
	font-size: 12px;
	color: var(--muted);
}

.code-box pre {
	margin: 0;
	padding: 16px 18px 18px;
	font-family: inherit;
	font-size: 12.5px;
	line-height: 20px;
	color: var(--body);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.code-box pre .k { color: var(--acc); }
.code-box pre .t { color: var(--muted); }
.code-box pre .v { color: var(--ink); }

.renders {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 18px;
	border-top: 1px solid var(--line);
	font-size: 13px;
	line-height: 20px;
	color: var(--ink);
}

.renders .label { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

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

.intro-cmd {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
	padding: 14px 18px;
	border: 1px solid var(--line-strong);
	border-radius: 8px;
	background-color: var(--term);
	font-size: 14px;
	line-height: 22px;
}

.intro-cmd code { flex: 1 1 auto; font-family: inherit; color: var(--ink); }

/* 404 ------------------------------------------------------------------- */

.missing > .wrap { padding-top: 72px; padding-bottom: 96px; display: flex; justify-content: center; }

/* Motion ---------------------------------------------------------------- */

/* Back to top ------------------------------------------------------------ */

.to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 20;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: 6px;
	background-color: var(--surface);
	color: var(--body);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.to-top.is-shown {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.to-top:hover {
	background-image: linear-gradient(var(--acc-tint), var(--acc-tint));
	border-color: var(--acc-line);
	color: var(--ink);
}

@media print {
	.to-top { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.cursor, .badge.is-wait::before, .skel { animation: none; }
	.rain span { animation: none; transform: none; }
	* { transition: none !important; }
}

/* Narrow screens -------------------------------------------------------- */

@media (max-width: 1023px) {
	.hero-top, .cards, .panels, .term-grid, .fields-grid { grid-template-columns: minmax(0, 1fr); }
	.toc { display: none; }
}

@media (max-width: 767px) {
	.wrap { padding-left: 20px; padding-right: 20px; }
	.nav a.nav-optional { display: none; }
	.hero > .wrap { padding-top: 40px; padding-bottom: 40px; gap: 28px; }
	.title { font-size: 30px; line-height: 36px; }
	.addr { font-size: 26px; line-height: 32px; }
	.addr.is-mid { font-size: 21px; line-height: 28px; }
	.addr.is-long { font-size: 18px; line-height: 26px; }
	.dl, .panel .dl { grid-template-columns: 112px minmax(0, 1fr); }
	.sec-head { flex-direction: column; align-items: flex-start; }
	.section { padding: 48px 0 56px; }
	.about { grid-template-columns: minmax(0, 1fr); }
	.about > div + div { border-left: 0; border-top: 1px solid var(--line); }
	.btn-copy { height: 44px; }
	.bar .wrap { flex-direction: column-reverse; align-items: stretch; }
	.strip { align-items: flex-start; flex-wrap: wrap; }
	.to-top { right: 16px; bottom: 16px; }
}
