/*
Theme Name: RB Design
Theme URI: https://rbdesignportal.wpenginepowered.com/
Author: Josh MacDonald
Description: Ritchie Bros. design system site (Orbit). Docs shell with a page-tree sidebar, light and dark mode.
Version: 0.2.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rb-design
*/

/* Tokens: the same neutral palette as the React portal (shadcn/ui). */

:root {
	--rb-background: oklch(1 0 0);
	--rb-foreground: oklch(0.145 0 0);
	--rb-card: oklch(1 0 0);
	--rb-primary: oklch(0.205 0 0);
	--rb-primary-foreground: oklch(0.985 0 0);
	--rb-muted: oklch(0.97 0 0);
	--rb-muted-foreground: oklch(0.556 0 0);
	--rb-accent: oklch(0.97 0 0);
	--rb-border: oklch(0.922 0 0);
	--rb-input: oklch(0.922 0 0);
	--rb-ring: oklch(0.708 0 0);
	--rb-destructive: oklch(0.577 0.245 27.325);
	--rb-sidebar: oklch(0.985 0 0);
	--rb-sidebar-accent: oklch(0.97 0 0);
	--rb-sidebar-border: oklch(0.922 0 0);
	--rb-do-bg: #dcfce7;
	--rb-do-fg: #14532d;
	--rb-dont-bg: #fee2e2;
	--rb-dont-fg: #7f1d1d;
	--rb-brand: #d97706;
	--rb-radius: 0.625rem;
	--rb-sidebar-w: 16rem;
	--rb-mono: "Geist Mono", "Geist Mono Fallback";
	color-scheme: light;
}

html.dark {
	--rb-background: oklch(0.145 0 0);
	--rb-foreground: oklch(0.985 0 0);
	--rb-card: oklch(0.205 0 0);
	--rb-primary: oklch(0.922 0 0);
	--rb-primary-foreground: oklch(0.205 0 0);
	--rb-muted: oklch(0.269 0 0);
	--rb-muted-foreground: oklch(0.708 0 0);
	--rb-accent: oklch(0.269 0 0);
	--rb-border: oklch(1 0 0 / 10%);
	--rb-input: oklch(1 0 0 / 15%);
	--rb-ring: oklch(0.556 0 0);
	--rb-destructive: oklch(0.704 0.191 22.216);
	--rb-sidebar: oklch(0.205 0 0);
	--rb-sidebar-accent: oklch(0.269 0 0);
	--rb-sidebar-border: oklch(1 0 0 / 10%);
	--rb-do-bg: #052e16;
	--rb-do-fg: #bbf7d0;
	--rb-dont-bg: #450a0a;
	--rb-dont-fg: #fecaca;
	color-scheme: dark;
}

/* Without JS, follow the system setting. */
@media (prefers-color-scheme: dark) {
	html:not(.light) {
		--rb-background: oklch(0.145 0 0);
		--rb-foreground: oklch(0.985 0 0);
		--rb-card: oklch(0.205 0 0);
		--rb-primary: oklch(0.922 0 0);
		--rb-primary-foreground: oklch(0.205 0 0);
		--rb-muted: oklch(0.269 0 0);
		--rb-muted-foreground: oklch(0.708 0 0);
		--rb-accent: oklch(0.269 0 0);
		--rb-border: oklch(1 0 0 / 10%);
		--rb-input: oklch(1 0 0 / 15%);
		--rb-ring: oklch(0.556 0 0);
		--rb-destructive: oklch(0.704 0.191 22.216);
		--rb-sidebar: oklch(0.205 0 0);
		--rb-sidebar-accent: oklch(0.269 0 0);
		--rb-sidebar-border: oklch(1 0 0 / 10%);
		--rb-do-bg: #052e16;
		--rb-do-fg: #bbf7d0;
		--rb-dont-bg: #450a0a;
		--rb-dont-fg: #fecaca;
		color-scheme: dark;
	}
}

/* Fonts: Inter and Geist Mono, the same files the React portal ships. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/2c55a0e60120577a-s.2a48534a.woff2") format("woff2");
  unicode-range: U+460-52F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/9c72aa0f40e4eef8-s.18a48cbc.woff2") format("woff2");
  unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/ad66f9afd8947f86-s.7a40eb73.woff2") format("woff2");
  unicode-range: U+1F??;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/5476f68d60460930-s.c995e352.woff2") format("woff2");
  unicode-range: U+370-377, U+37A-37F, U+384-38A, U+38C, U+38E-3A1, U+3A3-3FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/2bbe8d2671613f1f-s.76dcb0b2.woff2") format("woff2");
  unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0, U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/1bffadaabf893a1e-s.7cd81963.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter/83afe278b6a6bb3c-s.p.3a6ba036.woff2") format("woff2");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter Fallback;
  src: local(Arial);
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0.0%;
  size-adjust: 107.12%;
}


@font-face {
  font-family: Geist Mono;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono/5ce348bf30bf5439-s.56c1f21e.woff2") format("woff2");
  unicode-range: U+460-52F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: Geist Mono;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono/4fa387ec64143e14-s.3b336396.woff2") format("woff2");
  unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
}
@font-face {
  font-family: Geist Mono;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono/6306c77e7c8268e4-s.e3369375.woff2") format("woff2");
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}
@font-face {
  font-family: Geist Mono;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono/7d817b4c03b0c5f1-s.a40b9a8b.woff2") format("woff2");
  unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0, U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: Geist Mono;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono/bbc41e54d2fcbd21-s.fe42ddf4.woff2") format("woff2");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Geist Mono;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono/797e433ab948586e-s.p.29207c2f.woff2") format("woff2");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Geist Mono Fallback;
  src: local(Arial);
  ascent-override: 74.67%;
  descent-override: 21.92%;
  line-gap-override: 0.0%;
  size-adjust: 134.59%;
}

/* Base */

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	margin: 0;
	background: var(--rb-background);
	color: var(--rb-foreground);
}

*,
*::before,
*::after {
	box-sizing: border-box;
	border-color: var(--rb-border);
}

.wp-site-blocks {
	padding: 0;
}

.wp-site-blocks > * {
	margin-block: 0;
}

.rb-i {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

a {
	color: inherit;
}

:where(.rb-main) :focus-visible,
:where(.rb-sidebar, .rb-topbar) :focus-visible {
	outline: 2px solid color-mix(in oklab, var(--rb-muted-foreground) 50%, transparent);
	outline-offset: 2px;
}

/* App shell */

.rb-app {
	display: flex;
	min-height: 100vh;
}

.rb-app > *,
.rb-inset > *,
.rb-main > * {
	margin-block: 0;
}

/* Like the React sidebar: an in-flow spacer plus a fixed panel. A sticky sidebar puts the page on
   its own compositing layer, which turns off subpixel text smoothing in dark mode. */
.rb-sidebar {
	position: relative;
	flex: 0 0 var(--rb-sidebar-w);
	width: var(--rb-sidebar-w);
	transition: margin-left 0.2s linear;
}

.rb-sidebar-collapsed .rb-sidebar {
	margin-left: calc(var(--rb-sidebar-w) * -1);
}

.rb-sidebar__inner {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 10;
	display: flex;
	flex-direction: column;
	width: var(--rb-sidebar-w);
	overflow-y: auto;
	background: var(--rb-sidebar);
	border-right: 1px solid var(--rb-sidebar-border);
	transition: left 0.2s linear;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.admin-bar .rb-sidebar__inner {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.rb-sidebar-collapsed .rb-sidebar__inner {
	left: calc(var(--rb-sidebar-w) * -1);
}

.rb-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	height: 3.5rem;
	margin: 0.5rem 0.5rem 0;
	padding: 0.5rem 0.75rem;
	border-radius: 19.6px;
	text-decoration: none;
	line-height: 1;
}

.rb-brand:hover {
	background: var(--rb-sidebar-accent);
}

.rb-brand__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background: var(--rb-brand);
}

.rb-brand__mark img {
	width: 1rem;
	height: 1rem;
}

.rb-brand__text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.rb-brand__name {
	font-weight: 500;
}

.rb-nav {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.rb-nav__group {
	padding: 0.5rem;
}

.rb-nav__label {
	display: flex;
	align-items: center;
	height: 2rem;
	padding: 0 0.75rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 500;
	color: color-mix(in oklab, var(--rb-foreground) 70%, transparent);
}

.rb-nav__menu,
.rb-nav__sub {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rb-nav__btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	height: 2.25rem;
	padding: 0.5rem 0.75rem;
	border-radius: 19.6px;
	text-decoration: none;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.rb-nav__btn::-webkit-details-marker {
	display: none;
}

.rb-nav__btn span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rb-nav__btn:hover,
.rb-nav__btn[data-active] {
	background: var(--rb-sidebar-accent);
}

.rb-nav__btn[data-active] {
	font-weight: 500;
}

.rb-nav__chevron {
	margin-left: auto;
	transition: transform 0.2s;
}

.rb-nav__collapsible[open] > summary .rb-nav__chevron {
	transform: rotate(90deg);
}

.rb-nav__sub {
	gap: 0.25rem;
	margin: 0 0.875rem;
	padding: 2px 0.625rem;
	border-left: 1px solid var(--rb-sidebar-border);
}

.rb-nav__subbtn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	height: 1.75rem;
	padding: 0 0.75rem;
	border-radius: 19.6px;
	text-decoration: none;
	color: var(--rb-foreground);
}

.rb-nav__subbtn span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rb-nav__subbtn:hover,
.rb-nav__subbtn[data-active] {
	background: var(--rb-sidebar-accent);
}

.rb-scrim {
	display: none;
}

/* Canvas pages: the content area is a flex column, like the React portal's inset wrapper. */
.rb-inset > .rb-tw {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.rb-inset {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	background: var(--rb-background);
}

.rb-topbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	height: 4rem;
	padding: 0 1rem;
	flex-shrink: 0;
}

.rb-topbar__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	margin-left: -0.25rem;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 26px;
	background: none;
	color: inherit;
	cursor: pointer;
}

.rb-topbar__trigger:hover {
	background: var(--rb-muted);
}

.rb-topbar__sep {
	width: 1px;
	height: 1rem;
	margin-right: 0.5rem;
	background: var(--rb-border);
}

.rb-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--rb-muted-foreground);
}

.rb-crumbs a {
	text-decoration: none;
	transition: color 0.15s;
}

.rb-crumbs a:hover {
	color: var(--rb-foreground);
}

.rb-crumbs [aria-current] {
	color: var(--rb-foreground);
}

.rb-crumbs__sep {
	display: flex;
}

.rb-crumbs__sep .rb-i {
	width: 0.875rem;
	height: 0.875rem;
}

/* Page layout */

.rb-main {
	width: 100%;
	margin: 0 auto;
}

.rb-main--doc {
	max-width: 56rem;
	padding: 2rem;
	--rb-section-gap: 2.5rem;
	--rb-divider-gap: 1rem;
	--rb-inner-gap: 1rem;
}

.rb-is-component .rb-main--doc {
	--rb-section-gap: 2rem;
	--rb-divider-gap: 2rem;
	--rb-inner-gap: 0.75rem;
}

.rb-main--home {
	max-width: 64rem;
	padding: 4rem 2rem;
}

.rb-page-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}

.rb-page-header > * {
	margin: 0;
}

.rb-page-header:has(> .wp-block-post-title:only-child) {
	gap: 0;
}

.rb-main h1,
.rb-main .wp-block-post-title {
	margin: 0;
	font-size: 2.25rem;
	line-height: 2.5rem;
	font-weight: 600;
	letter-spacing: -0.025em;
}

.rb-pill {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: color-mix(in oklab, var(--rb-muted) 60%, transparent);
	color: var(--rb-muted-foreground);
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 500;
}

.rb-icon-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	background: var(--rb-card);
}

.rb-icon-tile .rb-i {
	width: 1.5rem;
	height: 1.5rem;
}

/* Prose */

.rb-prose {
	color: var(--rb-muted-foreground);
}

.rb-prose > * {
	margin-block: 0;
}

.rb-prose > * + * {
	margin-top: var(--rb-inner-gap);
}

.rb-prose > .rb-lede:first-child {
	margin-top: 0.75rem;
}

.rb-prose .rb-lede {
	font-size: 1.125rem;
	line-height: 1.75rem;
	color: var(--rb-muted-foreground);
}

.rb-prose h2,
.rb-prose h3,
.rb-prose th,
.rb-prose code {
	color: var(--rb-foreground);
}

.rb-prose > h2 {
	margin-top: var(--rb-section-gap);
	padding-top: var(--rb-divider-gap);
	border-top: 1px solid var(--rb-border);
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;
}

.rb-prose > .rb-lede + h2,
.rb-prose > h2:first-child,
.rb-prose > h2.rb-h2-plain {
	padding-top: 0;
	border-top: 0;
}

.rb-prose > .rb-lede + h2,
.rb-prose > h2.rb-h2-plain {
	margin-top: var(--rb-section-gap);
}

.rb-prose > .rb-h2-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: var(--rb-section-gap);
}

.rb-prose > .rb-h2-row > * {
	margin: 0;
}

.rb-prose > .rb-h2-row h2 {
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;
}

.rb-prose > .rb-h2-row p {
	color: var(--rb-foreground);
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
}

.rb-prose > h3 {
	margin-top: 1.5rem;
	font-size: 1.125rem;
	line-height: 1.75rem;
	font-weight: 600;
}

.rb-prose ul,
.rb-prose ol {
	padding-left: 1.5rem;
}

.rb-prose li + li {
	margin-top: 0.5rem;
}

.rb-is-component .rb-prose ul {
	color: var(--rb-foreground);
}

.rb-prose .rb-small {
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.rb-prose code {
	padding: 0.1em 0.35em;
	border-radius: 0.375rem;
	background: var(--rb-muted);
	font-family: var(--rb-mono);
	font-size: 0.875em;
}

.rb-prose .wp-block-code {
	padding: 1rem;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	background: var(--rb-card);
	overflow-x: auto;
	font-family: var(--rb-mono);
	font-size: 0.8125rem;
	line-height: 1.5;
}

.rb-prose .wp-block-code code {
	padding: 0;
	background: none;
	font-size: inherit;
}

/* Tables */

.rb-prose .wp-block-table {
	overflow-x: auto;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
}

.rb-prose .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.rb-prose .wp-block-table thead {
	border: 0;
}

.rb-prose .wp-block-table th,
.rb-prose .wp-block-table td {
	padding: 0.75rem 1rem;
	border: 0;
	border-bottom: 1px solid var(--rb-border);
	text-align: left;
	vertical-align: top;
}

.rb-prose .wp-block-table th {
	font-weight: 600;
	background: color-mix(in oklab, var(--rb-muted) 50%, transparent);
}

.rb-prose .wp-block-table tbody tr:last-child td {
	border-bottom: 0;
}

/* Do / Don't */

.rb-prose .rb-dodont {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 0;
}

.rb-prose .rb-dodont > .wp-block-column {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	background: var(--rb-card);
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.rb-prose .rb-dodont > .wp-block-column > * {
	margin: 0;
}

.rb-prose .rb-dodont__label {
	width: fit-content;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 500;
}

.rb-prose .rb-dodont__do .rb-dodont__label {
	background: var(--rb-do-bg);
	color: var(--rb-do-fg);
}

.rb-prose .rb-dodont__dont .rb-dodont__label {
	background: var(--rb-dont-bg);
	color: var(--rb-dont-fg);
}

.rb-prose .rb-dodont + .rb-dodont,
.rb-prose > h2 + .rb-dodont {
	margin-top: 1rem;
}

/* Embeds */

.rb-embed,
.rb-embed-placeholder {
	border-radius: var(--rb-radius);
}

.rb-embed-placeholder {
	overflow: hidden;
}

.rb-embed {
	display: block;
	width: 100%;
	border: 1px solid var(--rb-border);
}

.rb-embed-placeholder {
	display: flex;
	line-height: 1.25rem;
	align-items: center;
	justify-content: center;
	background: var(--rb-muted);
	color: var(--rb-muted-foreground);
	font-size: 0.875rem;
}

.rb-embed-error {
	padding: 0.75rem 1rem;
	border: 1px dashed #dc2626;
	border-radius: var(--rb-radius);
	color: #dc2626;
}

/* Pills (in-page jump links) */

.rb-prose ul.rb-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0;
	list-style: none;
}

.rb-prose ul.rb-pills li {
	margin: 0;
}

.rb-prose ul.rb-pills a {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--rb-border);
	border-radius: 999px;
	background: color-mix(in oklab, var(--rb-muted) 40%, transparent);
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 500;
	text-decoration: none;
}

.rb-prose ul.rb-pills a:hover {
	background: var(--rb-muted);
}

/* Cards */

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

.rb-prose .rb-cards--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
	border: 1px solid var(--rb-border);
	border-radius: 0.875rem;
	background: var(--rb-card);
	font-size: 0.875rem;
	line-height: 1.25rem;
	transition: background-color 0.15s, border-color 0.15s;
}

.rb-card > *,
.rb-cards > *,
.rb-stats > *,
.rb-home-section > * {
	margin: 0;
}

.rb-card h3 {
	font-size: 1rem;
	line-height: 1.5rem;
	font-weight: 500;
}

.rb-cards--3 .rb-card h3 + p {
	margin-top: -0.5rem;
}

.rb-card h3 a {
	text-decoration: none;
}

.rb-card h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.rb-card:has(h3 a):hover {
	border-color: color-mix(in oklab, var(--rb-foreground) 20%, transparent);
	background: color-mix(in oklab, var(--rb-accent) 40%, var(--rb-card));
}

.rb-card .rb-card__meta {
	margin-top: auto;
	padding-top: 0.5rem;
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 500;
}

/* Icon tiles inside content: add class rb-ic-<name> to a card or eyebrow. */

.rb-card[class*="rb-ic-"]::before,
.rb-eyebrow[class*="rb-ic-"]::before {
	content: "";
	display: block;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	background: var(--rb-background);
}

.rb-card[class*="rb-ic-"]::after,
.rb-eyebrow[class*="rb-ic-"]::after {
	content: "";
	position: absolute;
	width: 1.25rem;
	height: 1.25rem;
	background: var(--rb-foreground);
	z-index: 1;
	-webkit-mask: var(--rb-ic) center / contain no-repeat;
	mask: var(--rb-ic) center / contain no-repeat;
}

.rb-card[class*="rb-ic-"]::after {
	top: 2.125rem;
	left: 2.125rem;
}

/* Home */

.rb-home {
	color: var(--rb-muted-foreground);
}

.rb-home > * + * {
	margin-top: 4rem;
}

.rb-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 3rem;
	border: 1px solid var(--rb-border);
	border-radius: 1.375rem;
	background: var(--rb-card);
	overflow: hidden;
}

/* The two soft glows from the React hero: 18rem circles at 5% primary, blurred 64px. */
.rb-hero::before,
.rb-hero::after {
	content: "";
	position: absolute;
	width: 18rem;
	height: 18rem;
	border-radius: 999px;
	background: color-mix(in oklab, var(--rb-primary) 5%, transparent);
	filter: blur(64px);
	pointer-events: none;
}

.rb-hero::before {
	top: -6rem;
	right: -6rem;
}

.rb-hero::after {
	bottom: -8rem;
	left: -6rem;
}

.rb-hero > * {
	position: relative;
	margin: 0;
}

.rb-hero h1 {
	max-width: 48rem;
	font-size: 3rem;
	line-height: 1;
	text-wrap: balance;
}

.rb-hero .rb-lede {
	max-width: 42rem;
	font-size: 1.125rem;
	line-height: 1.75rem;
	text-wrap: pretty;
}

.rb-eyebrow {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
}

.rb-eyebrow[class*="rb-ic-"]::before {
	width: 2rem;
	height: 2rem;
}

.rb-eyebrow[class*="rb-ic-"]::after {
	background: currentColor;
	top: 50%;
	left: 0.4375rem;
	width: 1.125rem;
	height: 1.125rem;
	transform: translateY(-50%);
}

.rb-hero .wp-block-buttons {
	gap: 0.75rem;
	padding-top: 0.5rem;
}

.rb-section-head > * {
	margin: 0;
}

.rb-section-head {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.rb-section-head h2 {
	font-size: 1.5rem;
	line-height: 2rem;
	letter-spacing: -0.025em;
}

.rb-section-head p {
	max-width: 42rem;
}

.rb-home .rb-section-head + .rb-cards {
	margin-top: 1.5rem;
}

.rb-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1px;
	border: 1px solid var(--rb-border);
	border-radius: 1.125rem;
	background: var(--rb-border);
	overflow: hidden;
}

.rb-stat {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 1.5rem;
	background: var(--rb-card);
	text-align: center;
}

.rb-stat > * {
	margin: 0;
}

.rb-stat__value {
	color: var(--rb-foreground);
	font-size: 1.875rem;
	line-height: 2.25rem;
	font-weight: 600;
	letter-spacing: -0.025em;
}

.rb-stat__label {
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.rb-callout {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 2rem;
	border: 1px solid var(--rb-border);
	border-radius: 1.125rem;
	background: var(--rb-card);
}

.rb-callout > * {
	margin: 0;
}

.rb-callout__text > * {
	margin: 0;
}

.rb-callout__text {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.rb-callout h2 {
	color: var(--rb-foreground);
	font-size: 1.125rem;
	line-height: 1.75rem;
}

/* Buttons (shadcn "default" and "outline") */

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	height: 2.25rem;
	padding: 0 0.75rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--rb-primary);
	background-clip: padding-box;
	color: var(--rb-primary-foreground);
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s;
}

.wp-block-button__link:hover {
	background: color-mix(in oklab, var(--rb-primary) 80%, transparent);
	color: var(--rb-primary-foreground);
}

.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
	border-color: var(--rb-border);
	background: var(--rb-background);
	color: var(--rb-foreground);
}

html.dark .is-style-outline > .wp-block-button__link {
	background: transparent;
}

.is-style-outline > .wp-block-button__link:hover {
	background: var(--rb-muted);
	color: var(--rb-foreground);
}

.rb-arrow .wp-block-button__link::after {
	content: "";
	width: 1rem;
	height: 1rem;
	background: currentColor;
	-webkit-mask: url("assets/lucide/arrow-right.svg") center / contain no-repeat;
	mask: url("assets/lucide/arrow-right.svg") center / contain no-repeat;
}

/* Portal to-do ([rb_todo]) */

.rb-todo__check {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--rb-border);
}

.rb-todo__check h2 {
	margin: 0 0 0.5rem;
	color: var(--rb-foreground);
	font-size: 1.25rem;
	line-height: 1.75rem;
	font-weight: 600;
}

.rb-todo__check.is-done h2 {
	color: #15803d;
}

.rb-todo__check p {
	margin: 0 0 0.75rem;
}

.rb-todo__count {
	margin-left: 0.5rem;
	color: var(--rb-muted-foreground);
	font-size: 0.875rem;
	font-weight: 400;
}

.rb-todo__check ul {
	margin: 0;
	padding-left: 1.5rem;
	color: var(--rb-foreground);
}

.rb-todo__detail,
.rb-todo__edit {
	color: var(--rb-muted-foreground);
	font-size: 0.875rem;
}

.rb-todo__edit {
	margin-left: 0.5rem;
}

.rb-todo__download {
	display: inline-flex;
	align-items: center;
	height: 2.25rem;
	padding: 0 1rem;
	border: 1px solid var(--rb-border);
	border-radius: var(--rb-radius);
	background: var(--rb-card);
	color: var(--rb-foreground);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}

.rb-todo__download:hover {
	background: var(--rb-muted);
}

/* Search results */

.rb-results .wp-block-post-title {
	font-size: 1.125rem;
	line-height: 1.75rem;
}

/* Phones: the sidebar becomes a drawer opened from the top bar. */

@media (max-width: 767px) {
	.rb-sidebar,
	.rb-sidebar-collapsed .rb-sidebar {
		flex-basis: 0;
		width: 0;
		margin-left: 0;
	}

	.rb-sidebar__inner,
	.rb-sidebar-collapsed .rb-sidebar__inner {
		left: 0;
		z-index: 100;
		width: 18rem;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
	}

	.rb-sidebar-open .rb-sidebar__inner {
		transform: none;
	}

	.rb-sidebar-open .rb-scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 99;
		background: rgb(0 0 0 / 50%);
	}

	.rb-main--doc {
		padding: 1.5rem 1rem 3rem;
	}

	.rb-main--home {
		padding: 3rem 1rem;
	}

	.rb-hero {
		padding: 2rem;
	}

	.rb-hero h1 {
		font-size: 2.25rem;
		line-height: 2.5rem;
	}

	.rb-prose .rb-dodont,
	.rb-prose .rb-cards,
	.rb-prose .rb-cards--3 {
		grid-template-columns: minmax(0, 1fr);
	}

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

	.rb-callout {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.rb-prose .rb-cards--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Icon classes */

.rb-ic-accessibility { --rb-ic: url("assets/lucide/accessibility.svg"); }
.rb-ic-arrow-right { --rb-ic: url("assets/lucide/arrow-right.svg"); }
.rb-ic-arrow-up-right { --rb-ic: url("assets/lucide/arrow-up-right.svg"); }
.rb-ic-banknote { --rb-ic: url("assets/lucide/banknote.svg"); }
.rb-ic-blocks { --rb-ic: url("assets/lucide/blocks.svg"); }
.rb-ic-book-open { --rb-ic: url("assets/lucide/book-open.svg"); }
.rb-ic-boxes { --rb-ic: url("assets/lucide/boxes.svg"); }
.rb-ic-chevron-right { --rb-ic: url("assets/lucide/chevron-right.svg"); }
.rb-ic-compass { --rb-ic: url("assets/lucide/compass.svg"); }
.rb-ic-file-text { --rb-ic: url("assets/lucide/file-text.svg"); }
.rb-ic-file { --rb-ic: url("assets/lucide/file.svg"); }
.rb-ic-gallery-vertical-end { --rb-ic: url("assets/lucide/gallery-vertical-end.svg"); }
.rb-ic-gauge { --rb-ic: url("assets/lucide/gauge.svg"); }
.rb-ic-git-pull-request { --rb-ic: url("assets/lucide/git-pull-request.svg"); }
.rb-ic-globe { --rb-ic: url("assets/lucide/globe.svg"); }
.rb-ic-heart { --rb-ic: url("assets/lucide/heart.svg"); }
.rb-ic-image { --rb-ic: url("assets/lucide/image.svg"); }
.rb-ic-keyboard { --rb-ic: url("assets/lucide/keyboard.svg"); }
.rb-ic-layers { --rb-ic: url("assets/lucide/layers.svg"); }
.rb-ic-layout-grid { --rb-ic: url("assets/lucide/layout-grid.svg"); }
.rb-ic-message-square-warning { --rb-ic: url("assets/lucide/message-square-warning.svg"); }
.rb-ic-mouse-pointer-click { --rb-ic: url("assets/lucide/mouse-pointer-click.svg"); }
.rb-ic-orbit { --rb-ic: url("assets/lucide/orbit.svg"); }
.rb-ic-paintbrush { --rb-ic: url("assets/lucide/paintbrush.svg"); }
.rb-ic-palette { --rb-ic: url("assets/lucide/palette.svg"); }
.rb-ic-panel-left { --rb-ic: url("assets/lucide/panel-left.svg"); }
.rb-ic-pen-tool { --rb-ic: url("assets/lucide/pen-tool.svg"); }
.rb-ic-pencil-ruler { --rb-ic: url("assets/lucide/pencil-ruler.svg"); }
.rb-ic-rocket { --rb-ic: url("assets/lucide/rocket.svg"); }
.rb-ic-search { --rb-ic: url("assets/lucide/search.svg"); }
.rb-ic-shapes { --rb-ic: url("assets/lucide/shapes.svg"); }
.rb-ic-sparkles { --rb-ic: url("assets/lucide/sparkles.svg"); }
.rb-ic-tag { --rb-ic: url("assets/lucide/tag.svg"); }
.rb-ic-type { --rb-ic: url("assets/lucide/type.svg"); }
.rb-ic-users { --rb-ic: url("assets/lucide/users.svg"); }
.rb-ic-wrench { --rb-ic: url("assets/lucide/wrench.svg"); }
.rb-ic-layout-template { --rb-ic: url("assets/lucide/layout-template.svg"); }
.rb-ic-swatch-book { --rb-ic: url("assets/lucide/swatch-book.svg"); }
.rb-ic-megaphone { --rb-ic: url("assets/lucide/megaphone.svg"); }
.rb-ic-images { --rb-ic: url("assets/lucide/images.svg"); }
