/*
Theme Name: RobotArt
Theme URI: https://robotart.org
Description: Lightweight theme for the Robot Art Competition site. No jQuery or CSS framework on public pages; works with the robotart plugin.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Author: RobotArt
Text Domain: robotart
*/

/* ---------- Fonts (self-hosted, SIL OFL: fonts/OFL.txt) ---------- */
@font-face {
	font-family: "Space Grotesk";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "Space Grotesk";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
	--ra-bg: #ffffff;
	--ra-surface: #f6f7f9;
	--ra-surface-2: #f1f3f5;
	--ra-line: #e6e8eb;
	--ra-line-strong: #d5d9de;
	--ra-text: #111418;
	--ra-text-2: #4a535e;
	--ra-muted: #5b6470;
	--ra-accent: #1f6fd1;
	--ra-accent-hover: #16549e;
	--ra-accent-soft: #eaf2fc;
	--ra-accent-on-soft: #16549e;
	--ra-invert-bg: #111418;
	--ra-invert-text: #ffffff;
	--ra-invert-muted: #c9d0d8;
	--ra-danger: #b42318;
	--ra-danger-soft: #fdecea;
	--ra-success: #146c43;
	--ra-success-soft: #e7f5ee;
	--ra-shadow: 0 1px 2px rgba(17, 20, 24, 0.08), 0 4px 16px rgba(17, 20, 24, 0.06);
	--ra-radius: 12px;
	--ra-radius-lg: 16px;
	--ra-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ra-font-display: "Space Grotesk", var(--ra-font);
	--ra-max: 1120px;
	--ra-gutter: 24px;
	color-scheme: light;
}

@media not all { /* dark mode, off for now: change "not all" back to (prefers-color-scheme: dark) */
	:root {
		--ra-bg: #0f1216;
		--ra-surface: #161a20;
		--ra-surface-2: #1c2129;
		--ra-line: #262c35;
		--ra-line-strong: #343b46;
		--ra-text: #eef1f4;
		--ra-text-2: #b8c0ca;
		--ra-muted: #9aa4b0;
		--ra-accent: #6aa8f0;
		--ra-accent-hover: #92c0f5;
		--ra-accent-soft: #16263a;
		--ra-accent-on-soft: #92c0f5;
		--ra-invert-bg: #eef1f4;
		--ra-invert-text: #0f1216;
		--ra-invert-muted: #3a424c;
		--ra-danger: #f97066;
		--ra-danger-soft: #2a1513;
		--ra-success: #47cd89;
		--ra-success-soft: #10241a;
		--ra-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
		color-scheme: dark;
	}
	.ra-logo__word { filter: invert(1) hue-rotate(180deg); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
	margin: 0;
	background: var(--ra-bg);
	color: var(--ra-text);
	font-family: var(--ra-font);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	cursor: default;
}
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--ra-accent); text-underline-offset: 0.15em; }
a:hover { color: var(--ra-accent-hover); }
:focus-visible { outline: 3px solid var(--ra-accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--ra-font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
p { margin: 0 0 1em; }
hr, hr.wp-block-separator { border: 0; border-top: 1px solid var(--ra-line); margin: 32px 0; opacity: 1; }

.screen-reader-text, .ra-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ra-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ra-invert-bg); color: var(--ra-invert-text); }
.ra-skip:focus { top: 12px; }

.ra-container { max-width: var(--ra-max); margin: 0 auto; padding: 0 var(--ra-gutter); }
.ra-section { padding: 64px 0; }
.ra-section--tint { background: var(--ra-surface); border-top: 1px solid var(--ra-line); border-bottom: 1px solid var(--ra-line); }
.ra-main { padding-top: 40px; padding-bottom: 72px; }
.ra-stack { display: flex; flex-direction: column; gap: 24px; }
.ra-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ra-spread { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ra-muted { color: var(--ra-muted); }
.ra-lead { font-size: 19px; color: var(--ra-text-2); max-width: 640px; }
.ra-eyebrow { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ra-accent); }

/* ---------- Buttons, chips, badges ---------- */
.ra-btn, .button, input[type="submit"], button[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px; border-radius: 10px;
	border: 1px solid var(--ra-line-strong); background: var(--ra-bg); color: var(--ra-text);
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.ra-btn:hover { background: var(--ra-surface-2); color: var(--ra-text); }
.ra-btn--primary, input[type="submit"], button[type="submit"] { background: var(--ra-accent); border-color: var(--ra-accent); color: #ffffff; }
.ra-btn--primary:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: var(--ra-accent-hover); border-color: var(--ra-accent-hover); color: #ffffff; }
@media not all { /* dark mode, off for now: change "not all" back to (prefers-color-scheme: dark) */ .ra-btn--primary, input[type="submit"], button[type="submit"] { color: #0f1216; } .ra-btn--primary:hover { color: #0f1216; } }
.ra-btn--dark { background: var(--ra-invert-bg); border-color: var(--ra-invert-bg); color: var(--ra-invert-text); }
.ra-btn--dark:hover { opacity: 0.9; background: var(--ra-invert-bg); color: var(--ra-invert-text); }
.ra-btn--lg { min-height: 48px; padding: 0 22px; border-radius: 12px; }
.ra-btn[disabled], .ra-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.ra-chip {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
	border: 1px solid var(--ra-line-strong); background: var(--ra-bg); color: var(--ra-text);
	font-size: 15px; font-weight: 600; text-decoration: none;
}
.ra-chip:hover { background: var(--ra-surface-2); color: var(--ra-text); }
.ra-chip[aria-current="page"], .ra-chip.is-active { background: var(--ra-invert-bg); border-color: var(--ra-invert-bg); color: var(--ra-invert-text); }

.ra-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--ra-surface-2); color: var(--ra-text-2); font-size: 13px; font-weight: 600; }
.ra-badge--accent { background: var(--ra-accent-soft); color: var(--ra-accent-on-soft); }

/* ---------- Header ---------- */
.ra-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--ra-bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--ra-line); }
.admin-bar .ra-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ra-header { top: 0; position: relative; } }
.ra-header__inner { display: flex; align-items: center; gap: 16px 24px; min-height: 72px; }
.ra-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.ra-logo__robot { width: 40px; height: 40px; object-fit: contain; }
.ra-logo__word { height: 26px; width: auto; }
.ra-nav { flex: 1 1 auto; min-width: 0; }
.ra-nav ul { list-style: none; margin: 0; padding: 0; }
.ra-nav > ul, .ra-nav > div > ul { display: flex; flex-wrap: wrap; gap: 2px; }
.ra-nav li { position: relative; }
.ra-nav a { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--ra-text); text-decoration: none; font-size: 15px; font-weight: 500; }
.ra-nav a:hover { background: var(--ra-surface-2); color: var(--ra-text); }
.ra-nav .current-menu-item > a, .ra-nav .current-menu-ancestor > a, .ra-nav a[aria-current="page"] { color: var(--ra-accent-on-soft); background: var(--ra-accent-soft); font-weight: 600; }
.ra-nav .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: 0.6; }
.ra-nav .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 220px; padding: 8px; display: none;
	background: var(--ra-bg); border: 1px solid var(--ra-line); border-radius: var(--ra-radius); box-shadow: var(--ra-shadow);
}
.ra-nav .sub-menu .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 4px 12px; min-width: 0; }
.ra-nav .sub-menu .menu-item-has-children > a::after { display: none; }
.ra-nav .sub-menu .menu-item-has-children > a { font-weight: 700; }
.ra-nav li:hover > .sub-menu, .ra-nav li:focus-within > .sub-menu { display: block; }
.ra-account { display: flex; align-items: center; gap: 8px; flex: none; }
.ra-menu-toggle { display: none; }

@media (max-width: 960px) {
	.ra-header { position: relative; }
	.ra-header__inner { flex-wrap: wrap; gap: 8px; min-height: 64px; }
	.ra-account { order: 2; margin-left: auto; gap: 6px; }
	.ra-menu-toggle { display: inline-flex; order: 3; }
	.ra-nav { flex: 1 1 100%; order: 4; display: none; padding-bottom: 12px; }
	.ra-nav.is-open { display: block; }
	.ra-nav > ul, .ra-nav > div > ul { flex-direction: column; }
	.ra-nav .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 16px; }
	.ra-nav .menu-item-has-children > a::after { display: none; }
}
@media (max-width: 600px) {
	:root { --ra-gutter: 16px; }
	/* One-line header: logo, then icon buttons. */
	.ra-account .ra-btn__label, .ra-menu-toggle span { display: none; }
	.ra-account .ra-btn, .ra-menu-toggle { min-width: 44px; padding: 0 12px; }
	.ra-logo { gap: 6px; }
	.ra-logo__robot { width: 34px; height: 34px; }
	.ra-logo__word { height: 22px; }
	.ra-hero { padding: 40px 0 32px; gap: 32px; }
	.ra-section { padding: 48px 0; }
	.ra-callout { padding: 28px 22px; gap: 20px; }
	.ra-toolbar .ra-search, .ra-toolbar .ra-search input { width: 100%; }
}

/* ---------- Footer ---------- */
.ra-footer { border-top: 1px solid var(--ra-line); color: var(--ra-muted); font-size: 14px; }
.ra-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 32px var(--ra-gutter); }
.ra-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ra-footer a { color: var(--ra-muted); }
.ra-footer a:hover { color: var(--ra-text); }
.ra-footer .widget { margin: 0; }

/* ---------- Hero (front page) ---------- */
.ra-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 72px 0 56px; }
.ra-hero__copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ra-hero__title { margin: 0; font-size: clamp(42px, 7vw, 64px); line-height: 1.02; letter-spacing: -0.02em; }
.ra-hero__art { flex: 1 1 360px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ra-hero__art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: var(--ra-surface-2); display: block; }
.ra-hero__art a:nth-child(even) img { margin-top: 40px; }
.ra-hero__art a:nth-child(n+3) img { aspect-ratio: 4 / 3; }
.ra-stats { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 8px; }
.ra-stats__num { font-family: var(--ra-font-display); font-size: 32px; font-weight: 700; line-height: 1.1; }
.ra-stats__label { font-size: 14px; color: var(--ra-muted); }

.ra-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.ra-year { display: flex; flex-direction: column; border: 1px solid var(--ra-line); border-radius: var(--ra-radius-lg); overflow: hidden; color: var(--ra-text); text-decoration: none; background: var(--ra-bg); transition: box-shadow 0.15s, transform 0.15s; }
.ra-year:hover { color: var(--ra-text); box-shadow: var(--ra-shadow); transform: translateY(-2px); }
.ra-year__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--ra-line); }
.ra-year__thumbs img, .ra-year__thumbs span { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--ra-surface-2); }
.ra-year__body { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.ra-year__title { font-family: var(--ra-font-display); font-size: 28px; font-weight: 700; line-height: 1.1; }

.ra-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: 40px; border-radius: 20px; background: var(--ra-invert-bg); color: var(--ra-invert-text); }
.ra-callout__robot { width: 120px; height: 120px; object-fit: contain; background: #ffffff; border-radius: 16px; padding: 8px; flex: none; }
.ra-callout__copy { flex: 999 1 400px; min-width: 0; }
.ra-callout__copy h2 { font-size: 30px; margin-bottom: 8px; }
.ra-callout__copy p { margin: 0; color: var(--ra-invert-muted); }
.ra-callout .ra-btn { background: var(--ra-invert-text); color: var(--ra-invert-bg); border-color: var(--ra-invert-text); }
.ra-callout .ra-btn--ghost { background: transparent; color: var(--ra-invert-text); border-color: var(--ra-invert-muted); }

/* ---------- Page header, breadcrumb, tabs ---------- */
.ra-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; font-size: 14px; color: var(--ra-muted); }
.ra-breadcrumb a { color: var(--ra-muted); }
.ra-breadcrumb [aria-current] { color: var(--ra-text); }
.ra-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.ra-pagehead h1 { margin: 0 0 6px; }
.ra-pagehead p { margin: 0; color: var(--ra-text-2); }
.ra-segment { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; background: var(--ra-surface-2); border-radius: 12px; }
.ra-segment a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 9px; color: var(--ra-text-2); text-decoration: none; font-weight: 600; }
.ra-segment a:hover { color: var(--ra-text); }
.ra-segment a[aria-current="page"] { background: var(--ra-bg); color: var(--ra-text); box-shadow: 0 1px 2px rgba(17, 20, 24, 0.12); }
.ra-tabs { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--ra-line); margin-bottom: 24px; }
.ra-tabs a { padding: 12px 2px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ra-text-2); text-decoration: none; font-weight: 500; }
.ra-tabs a:hover { color: var(--ra-text); }
.ra-tabs a[aria-current="page"] { border-color: var(--ra-text); color: var(--ra-text); font-weight: 600; }
.ra-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }

/* ---------- Forms ---------- */
.ra-field, .ra-search { display: flex; align-items: center; gap: 8px; }
.ra-search { min-height: 44px; padding: 0 12px; border: 1px solid var(--ra-line-strong); border-radius: 10px; background: var(--ra-bg); }
.ra-search input { border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: var(--ra-text); width: 200px; min-height: 40px; }
.ra-search svg { color: var(--ra-muted); flex: none; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"]:not(.ra-search input), input[type="tel"], input[type="number"], select, textarea {
	font: inherit; font-size: 16px; color: var(--ra-text); background: var(--ra-bg);
	min-height: 44px; padding: 8px 12px; border: 1px solid var(--ra-line-strong); border-radius: 10px; max-width: 100%;
}
textarea { min-height: 120px; width: 100%; }
label { font-weight: 600; }
.ra-field label, .ra-sortform label { font-weight: 500; color: var(--ra-text-2); font-size: 15px; }

/* ---------- Art cards & grids ---------- */
.ra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 28px 24px; }
.ra-grid--sm { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 20px; }
.ra-card { display: flex; flex-direction: column; gap: 12px; color: var(--ra-text); text-decoration: none; min-width: 0; }
.ra-card:hover { color: var(--ra-text); }
.ra-card__media { position: relative; border-radius: var(--ra-radius); overflow: hidden; background: var(--ra-surface-2); }
.ra-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; transition: transform 0.3s; }
.ra-grid--sm .ra-card__media img, .ra-card--square .ra-card__media img { aspect-ratio: 1 / 1; }
.ra-card:hover .ra-card__media img { transform: scale(1.03); }
.ra-card__tag { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #111418; font-size: 12px; font-weight: 600; }
.ra-card__body { display: flex; flex-direction: column; gap: 2px; }
.ra-card__title { font-weight: 600; font-size: 17px; line-height: 1.3; }
.ra-card__meta { font-size: 14px; color: var(--ra-muted); }
.ra-card__noimg { width: 100%; aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; color: var(--ra-muted); font-size: 14px; }

/* team cards */
.ra-team { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--ra-line); border-radius: 14px; color: var(--ra-text); text-decoration: none; background: var(--ra-bg); min-width: 0; }
.ra-team:hover { color: var(--ra-text); box-shadow: var(--ra-shadow); }
.ra-team__logo { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; background: #ffffff; border: 1px solid var(--ra-line); flex: none; }
.ra-team__logo--empty { display: flex; align-items: center; justify-content: center; font-family: var(--ra-font-display); font-weight: 700; color: var(--ra-muted); background: var(--ra-surface-2); }
.ra-team__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ra-team__name { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.ra-team__meta { font-size: 14px; color: var(--ra-muted); overflow-wrap: anywhere; }
.ra-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }

/* ---------- Artwork detail ---------- */
.ra-art { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.ra-art__media { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ra-art__stage { display: block; border-radius: var(--ra-radius-lg); overflow: hidden; background: var(--ra-surface-2); }
.ra-art__stage img { width: 100%; max-height: 760px; object-fit: contain; display: block; margin: 0 auto; }
.ra-art__slide { display: none; }
.ra-art__slide.is-active { display: block; }
.ra-art__caption { padding: 4px 2px 0; }
.ra-art__caption h2 { font-size: 18px; margin: 0 0 4px; }
.ra-art__caption p { margin: 0; color: var(--ra-text-2); font-size: 15px; }
.ra-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.ra-thumbs button { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--ra-surface-2); cursor: pointer; }
.ra-thumbs button[aria-current="true"] { border-color: var(--ra-text); }
.ra-thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.ra-art__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.ra-art__side h1 { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1.05; }
.ra-art__desc { color: var(--ra-text-2); white-space: pre-line; }
.ra-panel { padding: 18px 20px; border-radius: 14px; background: var(--ra-surface); border: 1px solid var(--ra-line); }
.ra-notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; background: var(--ra-surface); border: 1px solid var(--ra-line); color: var(--ra-text-2); font-size: 15px; }
.ra-notice svg { flex: none; margin-top: 2px; }
.ra-notice--success { background: var(--ra-success-soft); border-color: transparent; color: var(--ra-success); }
.ra-notice--error { background: var(--ra-danger-soft); border-color: transparent; color: var(--ra-danger); }
.ra-vote { display: flex; align-items: center; gap: 12px; }
.ra-vote__count { flex: 1; text-align: center; font-family: var(--ra-font-display); font-size: 28px; font-weight: 700; }
.ra-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ra-links li { padding-bottom: 16px; border-bottom: 1px solid var(--ra-line); }
.ra-links li:last-child { border-bottom: 0; }
.ra-share { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ra-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Team profile ---------- */
.ra-profile { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-bottom: 40px; }
.ra-profile__images { display: flex; gap: 12px; flex: none; }
.ra-profile__images img { width: 120px; height: 120px; object-fit: cover; border-radius: 16px; border: 1px solid var(--ra-line); background: #ffffff; }
.ra-profile__images img.is-logo { object-fit: contain; padding: 8px; }
.ra-profile__info { flex: 999 1 420px; min-width: 0; }
.ra-profile__info h1 { margin-bottom: 8px; }
.ra-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 15px; }
.ra-dl dt { color: var(--ra-muted); }
.ra-dl dd { margin: 0; overflow-wrap: anywhere; }
.ra-cat { margin-top: 40px; }
.ra-cat h2 { font-size: 24px; }

/* ---------- Content (pages, posts, winners) ---------- */
.ra-content { max-width: 820px; }
.ra-content--wide { max-width: none; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--ra-line-strong); color: var(--ra-text-2); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--ra-line); text-align: left; }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption { font-size: 14px; color: var(--ra-muted); margin-top: 8px; }
.entry-content .wp-block-embed__wrapper iframe, .entry-content iframe[src*="youtube"], .entry-content iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.entry-content .alignleft { float: left; margin: 0 24px 16px 0; }
.entry-content .alignright { float: right; margin: 0 0 16px 24px; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .clear { clear: both; }

/* [simple_thumb_link] thumbnails: consecutive thumbs become a grid */
.entry-content :is(p, div):has(.ra-thumb):not(:has(p, div p)) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 20px; margin: 20px 0 32px; }
.entry-content :is(p, div):has(.ra-thumb) span:has(.ra-thumb) { display: contents; }
.entry-content :is(p, div):has(.ra-thumb) br, .entry-content :is(p, div):has(.ra-thumb) .clear { display: none; }
/* Consecutive videos sit side by side, half width each (a single video stays full width). */
@media (min-width: 720px) {
	.entry-content .wp-block-embed.is-type-video:has(+ .wp-block-embed.is-type-video),
	.entry-content .wp-block-embed.is-type-video + .wp-block-embed.is-type-video {
		display: inline-block; width: calc(50% - 14px); vertical-align: top; margin: 0 0 24px;
	}
	.entry-content .wp-block-embed.is-type-video + .wp-block-embed.is-type-video { margin-left: 20px; }
}
.ra-thumb { display: flex; flex-direction: column; gap: 10px; color: var(--ra-text); text-decoration: none; min-width: 0; }
.ra-thumb:hover { color: var(--ra-text); }
.ra-thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: var(--ra-surface-2); display: block; transition: transform 0.3s; }
.ra-thumb:hover img { transform: scale(1.03); }
.ra-thumb__title { font-weight: 600; line-height: 1.3; }
.ra-thumb__meta { font-size: 14px; color: var(--ra-muted); margin-top: -6px; }
.ra-thumb-wrap { display: contents; }
.ra-thumb-note { font-size: 15px; color: var(--ra-text-2); }

/* ---------- Pagination ---------- */
.pagination, .ra-pager, .wp-pagenavi { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 40px 0 0; padding: 0; }
.pagination li { display: contents; }
.pagination a, .pagination span, .ra-pager a, .ra-pager span, .wp-pagenavi a, .wp-pagenavi span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--ra-line-strong); border-radius: 10px; color: var(--ra-text); text-decoration: none; font-weight: 600; background: var(--ra-bg);
}
.pagination a:hover, .ra-pager a:hover, .wp-pagenavi a:hover { background: var(--ra-surface-2); color: var(--ra-text); }
.pagination .current, .ra-pager .current, .wp-pagenavi .current { background: var(--ra-invert-bg); border-color: var(--ra-invert-bg); color: var(--ra-invert-text); }
.pagination .dots, .wp-pagenavi .extend { border: 0; background: none; }

/* ---------- Posts list, search ---------- */
.ra-posts { display: flex; flex-direction: column; gap: 32px; }
.ra-post { padding-bottom: 32px; border-bottom: 1px solid var(--ra-line); }
.ra-post h2 { font-size: 26px; margin-bottom: 6px; }
.ra-post h2 a { color: var(--ra-text); text-decoration: none; }
.ra-post h2 a:hover { color: var(--ra-accent); }
.ra-post__meta { font-size: 14px; color: var(--ra-muted); margin-bottom: 10px; }

/* ---------- Comments ---------- */
.ra-comments { max-width: 760px; margin-top: 48px; }
.ra-comments ol { list-style: none; margin: 0 0 24px; padding: 0; }
.ra-comments .children { list-style: none; padding-left: 24px; border-left: 2px solid var(--ra-line); margin-top: 16px; }
.ra-comments li.comment { margin-bottom: 20px; }
.ra-comments .comment-body { padding: 16px 18px; border-radius: 14px; background: var(--ra-surface); border: 1px solid var(--ra-line); }
.ra-comments .comment-meta, .ra-comments .comment-author { font-size: 14px; color: var(--ra-muted); }
.ra-comments .comment-author .fn, .ra-comments .comment-author cite { font-style: normal; font-weight: 600; color: var(--ra-text); }
.ra-comments .avatar { border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.ra-comments .reply a { font-size: 14px; font-weight: 600; }
.comment-form p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.comment-form .comment-form-cookies-consent { flex-direction: row; align-items: center; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; max-width: 420px; }

/* ---------- Widgets / sidebar ---------- */
.ra-aside .widget { margin-bottom: 24px; }
.ra-aside .widget-title { font-size: 18px; }

/* ---------- bbPress ---------- */
#bbpress-forums { font-size: 16px !important; }
#bbpress-forums ul.bbp-forums, #bbpress-forums ul.bbp-topics, #bbpress-forums ul.bbp-replies, #bbpress-forums ul.bbp-lead-topic { border: 1px solid var(--ra-line) !important; border-radius: var(--ra-radius); overflow: hidden; }
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { background: var(--ra-surface) !important; border-color: var(--ra-line) !important; }
#bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic, #bbpress-forums div.odd, #bbpress-forums ul.odd { background: var(--ra-bg) !important; border-color: var(--ra-line) !important; }
#bbpress-forums div.even, #bbpress-forums ul.even { background: var(--ra-surface) !important; }
#bbpress-forums div.bbp-reply-header, #bbpress-forums div.bbp-topic-header { background: var(--ra-surface-2) !important; border-color: var(--ra-line) !important; }
#bbpress-forums .bbp-breadcrumb, #bbpress-forums .bbp-pagination { font-size: 14px; color: var(--ra-muted); }
#bbpress-forums div.bbp-template-notice { border-radius: 12px; }
#bbpress-forums fieldset.bbp-form { border-color: var(--ra-line); border-radius: 12px; }

/* ---------- 404 / empty ---------- */
.ra-empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--ra-line-strong); border-radius: var(--ra-radius-lg); color: var(--ra-muted); }
.ra-404 { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; padding: 48px 0; }
.ra-404 img { width: 200px; height: auto; }

/* ---------- Contest form pages (legacy Bootstrap 3 markup) ---------- */
/* These pages also load the plugin's Bootstrap stylesheet; keep the new header/footer intact. */
.ra-legacy .ra-header a, .ra-legacy .ra-footer a { text-decoration: none; }
.ra-legacy .ra-main #content.container { width: auto; max-width: var(--ra-max); padding: 0 var(--ra-gutter); }
.ra-legacy .btn { border-radius: 10px; min-height: 40px; font-weight: 600; }
.ra-legacy .btn-primary { background: var(--ra-accent); border-color: var(--ra-accent); }
.ra-legacy .form-control { border-radius: 10px; min-height: 44px; box-shadow: none; }
.ra-legacy .panel { border-radius: 14px; border-color: var(--ra-line); box-shadow: none; }
.ra-legacy .alert { border-radius: 12px; }
@media not all { /* dark mode, off for now: change "not all" back to (prefers-color-scheme: dark) */
	.ra-legacy .form-control, .ra-legacy .panel, .ra-legacy .well, .ra-legacy .list-group-item { background: var(--ra-surface); color: var(--ra-text); border-color: var(--ra-line); }
	.ra-legacy .panel-heading, .ra-legacy .panel-default > .panel-heading { background: var(--ra-surface-2); color: var(--ra-text); border-color: var(--ra-line); }
}

/* ---------- Phones: galleries two per row (kept last so it wins over the grid rules above) ---------- */
@media (max-width: 600px) {
	.ra-grid, .ra-grid--sm, .entry-content :is(p, div):has(.ra-thumb):not(:has(p, div p)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
	.ra-card__title, .ra-thumb__title { font-size: 15px; }
	.ra-card__meta, .ra-thumb__meta { font-size: 13px; }
	.ra-card__tag { font-size: 11px; padding: 3px 8px; left: 6px; top: 6px; }
	.ra-thumb { gap: 8px; }
}
/* Thumbnail rows from consecutive paragraphs read as one gallery. */
.entry-content :is(p, div):has(.ra-thumb):not(:has(p, div p)) { margin: 0 0 20px; }
.ra-profile__school { margin: -2px 0 14px; font-size: 19px; font-weight: 500; color: var(--ra-text-2); }
.ra-profile__school a { color: inherit; text-decoration-color: var(--ra-line-strong); }
.ra-profile__school a:hover { color: var(--ra-accent); }
.ra-year__title { font-size: 40px; letter-spacing: -0.02em; }

/* Artwork page: the image column is sized to the artwork (width set inline by the template). */
.ra-art { gap: 40px; }
.ra-art__media { min-width: 0; max-width: 100%; }
.ra-art__stage { background: none; }
.ra-art__stage img { width: 100%; height: auto; max-height: 760px; object-fit: contain; border-radius: var(--ra-radius-lg); }
.ra-art__side { flex: 1 1 320px; }

/* YouTube embeds from artwork links (plugin markup uses Bootstrap's embed classes). */
.embed-responsive { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--ra-radius); background: #000; }
.embed-responsive .embed-responsive-item, .embed-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ra-links { max-width: 900px; }

/* Artwork gallery: arrows, counter, fade, thumbnails. */
.ra-gallery { position: relative; display: grid; border-radius: var(--ra-radius-lg); outline-offset: 4px; touch-action: pan-y; }
.ra-gallery .ra-art__slide { display: block; grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
.ra-gallery .ra-art__slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.ra-gallery__nav {
	position: absolute; top: calc(50% - 22px); z-index: 2; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: #111418; box-shadow: var(--ra-shadow); cursor: pointer;
	opacity: 0; transition: opacity 0.15s, transform 0.15s;
}
.ra-gallery__nav--prev { left: 12px; }
.ra-gallery__nav--next { right: 12px; }
.ra-gallery:hover .ra-gallery__nav, .ra-gallery:focus-within .ra-gallery__nav { opacity: 1; }
.ra-gallery__nav:hover { transform: scale(1.06); }
@media (hover: none) { .ra-gallery__nav { opacity: 1; } }
.ra-gallery__count { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: rgba(17, 20, 24, 0.72); color: #ffffff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.ra-thumbs { grid-template-columns: repeat(auto-fill, 76px); gap: 10px; margin-top: 4px; }
.ra-thumbs button { border: 0; padding: 0; border-radius: 12px; outline: 2px solid transparent; outline-offset: 2px; opacity: 0.6; transition: opacity 0.15s, outline-color 0.15s; }
.ra-thumbs button:hover { opacity: 1; }
.ra-thumbs button[aria-current="true"] { opacity: 1; outline-color: var(--ra-accent); border: 0; }
.ra-thumbs img { width: 76px; height: 76px; border-radius: 12px; }

/* Content headings: bigger, tighter; a separator right after a heading becomes a short accent bar. */
.entry-content h2 { font-size: clamp(28px, 3.4vw, 36px); margin: 1.4em 0 0.4em; }
.entry-content h3 { font-size: clamp(24px, 2.8vw, 30px); font-weight: 700; letter-spacing: -0.015em; margin: 1.5em 0 0.4em; }
.entry-content h4 { font-size: 20px; margin: 1.4em 0 0.4em; }
.entry-content > :is(h2, h3, h4):first-child { margin-top: 0; }
.entry-content :is(h2, h3, h4) + hr.wp-block-separator {
	width: 48px; border: 0; border-top: 3px solid var(--ra-accent); border-radius: 2px; margin: 10px 0 20px;
}
.ra-section--tint .entry-content :is(h2, h3) { color: var(--ra-text); }

/* All pages use the full content width, like the homepage. */
.ra-content { max-width: none; }

/* Front-page hero artworks: enlarge on hover (mouse devices only). */
.ra-hero__art a { display: block; position: relative; z-index: 0; border-radius: 14px; }
.ra-hero__art img { transition: transform 0.6s ease, box-shadow 0.6s ease; will-change: transform; }
@media (hover: hover) and (pointer: fine) {
	.ra-hero__art a:hover, .ra-hero__art a:focus-visible { z-index: 2; }
	.ra-hero__art a:hover img, .ra-hero__art a:focus-visible img { transform: scale(1.08); box-shadow: 0 12px 32px rgba(17, 20, 24, 0.25); }
}

/* More room between a page title and its content. */
.ra-main article > h1, .ra-main .ra-content > h1 { margin-bottom: 28px; }
/* Floated images clear before the next heading, so headings never wrap beside them. */
.entry-content :is(h2, h3, h4) { clear: both; }

/* Thumbnails wrapped in inline formatting (bold, italic, span) still join the gallery grid. */
.entry-content :is(p, div):has(.ra-thumb) :is(span, strong, b, em, i):has(.ra-thumb) { display: contents; }
.ra-thumb { font-weight: 400; font-style: normal; }
.ra-thumb .ra-thumb__title { font-weight: 600; }

/* Dividers always start below floated images. */
.entry-content hr { clear: both; }

/* Classic captioned images ([caption]) */
.entry-content .wp-caption { max-width: 100%; margin-bottom: 16px; }
.entry-content .wp-caption.alignleft { margin: 4px 24px 16px 0; }
.entry-content .wp-caption.alignright { margin: 4px 0 16px 24px; }
.entry-content .wp-caption img { display: block; border-radius: 10px; }
.entry-content .wp-caption-text, .entry-content .wp-element-caption { font-size: 14px; color: var(--ra-muted); margin: 8px 0 0; line-height: 1.4; }
.entry-content p:has(> em:only-child) { color: var(--ra-text-2); }
.entry-content p:empty { display: none; }

/* Images that open in the lightbox */
.entry-content a.ra-zoom { cursor: zoom-in; display: inline-block; }
.entry-content a.ra-zoom img { transition: opacity 0.15s; }
.entry-content a.ra-zoom:hover img { opacity: 0.9; }

/* "Contest closed" banner on rules pages */
.ra-banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; margin: 0 0 28px; border-radius: 14px; background: var(--ra-accent-soft); color: var(--ra-accent-on-soft); }
.ra-banner svg { flex: none; margin-top: 3px; }
.ra-banner strong { display: block; color: var(--ra-text); font-size: 17px; }
.ra-banner p { margin: 2px 0 0; color: var(--ra-text-2); font-size: 15px; }
.ra-banner a { font-weight: 600; }

/* Content galleries: fixed columns, so a single artwork is the same size as in a full row. */
.entry-content :is(p, div):has(.ra-thumb):not(:has(p, div p)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .entry-content :is(p, div):has(.ra-thumb):not(:has(p, div p)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .entry-content :is(p, div):has(.ra-thumb):not(:has(p, div p)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Mobile menu: slide-in panel ---------- */
.ra-nav__head, .ra-nav-backdrop { display: none; }
@media (max-width: 960px) {
	.ra-header { backdrop-filter: none; background: var(--ra-bg); }
	.ra-nav {
		display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 101;
		width: min(86vw, 360px); padding: 0 16px 24px; overflow-y: auto; overscroll-behavior: contain;
		background: var(--ra-bg); box-shadow: -12px 0 40px rgba(17, 20, 24, 0.18);
		transform: translateX(100%); visibility: hidden; transition: transform 0.28s ease, visibility 0s linear 0.28s;
	}
	.ra-nav.is-open { transform: translateX(0); visibility: visible; transition: transform 0.28s ease; }
	.ra-nav__head { display: flex; align-items: center; justify-content: space-between; min-height: 64px; margin-bottom: 8px; border-bottom: 1px solid var(--ra-line); position: sticky; top: 0; background: var(--ra-bg); }
	.ra-nav__title { font-family: var(--ra-font-display); font-weight: 700; font-size: 20px; }
	.ra-nav__close { min-width: 44px; padding: 0; }
	.ra-nav > ul, .ra-nav > div > ul { flex-direction: column; gap: 0; }
	.ra-nav a { min-height: 48px; font-size: 17px; padding: 0 12px; }
	.ra-nav > ul > li, .ra-nav > div > ul > li { border-bottom: 1px solid var(--ra-line); }
	.ra-nav .sub-menu { padding: 0 0 8px 12px; }
	.ra-nav .sub-menu a { min-height: 40px; font-size: 15px; color: var(--ra-text-2); }
	.ra-nav .sub-menu .menu-item-has-children > a { color: var(--ra-text); font-size: 15px; }
	.ra-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 100; background: rgba(17, 20, 24, 0.45); opacity: 0; transition: opacity 0.25s ease; }
	.ra-nav-backdrop.is-visible { opacity: 1; }
	body.ra-menu-open { overflow: hidden; }
}

/* ---------- Contest form pages (plugin templates on Bootstrap 3 markup) ---------- */
.ra-legacy .ra-site-main { padding: 40px 0 72px; }
.ra-legacy .ra-site-main > .container, .ra-legacy .ra-site-main .container { width: auto; max-width: var(--ra-max); padding-left: var(--ra-gutter); padding-right: var(--ra-gutter); }
.ra-legacy .ra-site-main .row { margin-left: -12px; margin-right: -12px; }
.ra-legacy h1 { font-size: clamp(32px, 4vw, 44px); margin: 0 0 16px; }
.ra-legacy h2, .ra-legacy h3, .ra-legacy h4, .ra-legacy legend { font-family: var(--ra-font-display); color: var(--ra-text); }
.ra-legacy legend { border: 0; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.ra-legacy .well { background: var(--ra-surface); border: 1px solid var(--ra-line); border-radius: 14px; box-shadow: none; padding: 20px 22px; }
.ra-legacy label { font-weight: 600; color: var(--ra-text); font-size: 15px; }
.ra-legacy .checkbox label, .ra-legacy .radio label, .ra-legacy label:has(input[type="checkbox"]) { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.ra-legacy input[type="checkbox"], .ra-legacy input[type="radio"] { width: 18px; height: 18px; accent-color: var(--ra-accent); margin: 0; }
.ra-legacy .form-group { margin-bottom: 18px; }
.ra-legacy .form-control { height: auto; min-height: 44px; padding: 10px 12px; font-size: 16px; color: var(--ra-text); border-color: var(--ra-line-strong); }
.ra-legacy .form-control:focus { border-color: var(--ra-accent); box-shadow: 0 0 0 3px var(--ra-accent-soft); }
.ra-legacy textarea.form-control, .ra-legacy textarea { min-height: 120px; }
.ra-legacy .btn { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; font-weight: 600; font-size: 15px; box-shadow: none; text-shadow: none; }
.ra-legacy .btn-primary, .ra-legacy .btn-success, .ra-legacy input[type="submit"].btn { background: var(--ra-accent); border-color: var(--ra-accent); color: #ffffff; }
.ra-legacy .btn-primary:hover, .ra-legacy .btn-success:hover { background: var(--ra-accent-hover); border-color: var(--ra-accent-hover); color: #ffffff; }
.ra-legacy .btn-default, .ra-legacy .btn-warning { background: var(--ra-bg); border-color: var(--ra-line-strong); color: var(--ra-text); }
.ra-legacy .btn-danger { background: var(--ra-danger); border-color: var(--ra-danger); color: #ffffff; }
.ra-legacy .btn-lg, .ra-legacy .input-lg { font-size: 16px; }
.ra-legacy .alert { border-radius: 12px; border: 0; }
.ra-legacy .alert-danger { background: var(--ra-danger-soft); color: var(--ra-danger); }
.ra-legacy .alert-success { background: var(--ra-success-soft); color: var(--ra-success); }
.ra-legacy .alert-warning, .ra-legacy .alert-info { background: var(--ra-accent-soft); color: var(--ra-accent-on-soft); }
.ra-legacy .panel { border-radius: 14px; border-color: var(--ra-line); box-shadow: none; overflow: hidden; }
.ra-legacy .panel-heading { background: var(--ra-surface); border-color: var(--ra-line); font-weight: 600; }
.ra-legacy .list-group-item { border-color: var(--ra-line); }
.ra-legacy .list-group-item:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.ra-legacy .list-group-item:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.ra-legacy hr { border-top-color: var(--ra-line); }
.ra-legacy .ra-site-main img { border-radius: 10px; }
.ra-legacy .btn-info { background: var(--ra-bg); border-color: var(--ra-line-strong); color: var(--ra-text); }
.ra-legacy .btn-info:hover { background: var(--ra-surface-2); color: var(--ra-text); }

/* ---------- Header too full for one line (any width): use the slide-in menu ---------- */
.ra-header.is-collapsed { backdrop-filter: none; background: var(--ra-bg); }
.ra-header.is-collapsed .ra-header__inner { flex-wrap: nowrap; }
.ra-header.is-collapsed .ra-account { order: 2; margin-left: auto; }
.ra-header.is-collapsed .ra-menu-toggle { display: inline-flex; order: 3; }
.ra-header.is-collapsed .ra-nav {
	display: flex; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; z-index: 101; order: 4;
	width: min(86vw, 360px); padding: 0 16px 24px; overflow-y: auto; overscroll-behavior: contain;
	background: var(--ra-bg); box-shadow: -12px 0 40px rgba(17, 20, 24, 0.18);
	transform: translateX(100%); visibility: hidden; transition: transform 0.28s ease, visibility 0s linear 0.28s;
}
.ra-header.is-collapsed .ra-nav.is-open { transform: translateX(0); visibility: visible; transition: transform 0.28s ease; }
.ra-header.is-collapsed .ra-nav__head { display: flex; align-items: center; justify-content: space-between; min-height: 64px; margin-bottom: 8px; border-bottom: 1px solid var(--ra-line); position: sticky; top: 0; background: var(--ra-bg); }
.ra-header.is-collapsed .ra-nav > ul, .ra-header.is-collapsed .ra-nav > div > ul { flex-direction: column; gap: 0; flex-wrap: nowrap; }
.ra-header.is-collapsed .ra-nav a { min-height: 48px; font-size: 17px; }
.ra-header.is-collapsed .ra-nav > ul > li { border-bottom: 1px solid var(--ra-line); }
.ra-header.is-collapsed .ra-nav .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
.ra-header.is-collapsed .ra-nav .sub-menu a { min-height: 40px; font-size: 15px; color: var(--ra-text-2); }
.ra-header.is-collapsed .ra-nav .menu-item-has-children > a::after { display: none; }
.ra-header.is-collapsed .ra-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 100; background: rgba(17, 20, 24, 0.45); opacity: 0; transition: opacity 0.25s ease; }
.ra-header.is-collapsed .ra-nav-backdrop.is-visible { opacity: 1; }

/* Artwork page: on desktop the text always stays beside the image (wide images shrink to fit). */
@media (min-width: 900px) {
	.ra-art { flex-wrap: nowrap; }
	.ra-art__media { flex-shrink: 1; min-width: 0; }
	.ra-art__side { min-width: 300px; }
}
/* Gallery thumbnails: the image fills its square button. */
.ra-thumbs button { width: 76px; height: 76px; overflow: hidden; display: block; }
.ra-thumbs button img { width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; display: block; border-radius: 0; }

/* The menu backdrop must never block taps unless the menu is open. */
.ra-nav-backdrop[hidden] { display: none !important; }
.ra-nav-backdrop { pointer-events: none; }
.ra-nav-backdrop.is-visible { pointer-events: auto; }
