/* Autism Forge theme foundation.  The original LCARS design is the Standard
 * theme and remains the base/fallback.  /theme.js loads one small stylesheet
 * from /themes/ for palette and seasonal decoration.  Alternate themes use
 * the common non-LCARS layout near the end of this file.  See
 * /opt/autism-chat/web/THEMES.md before adding a theme.
 *
 * Standard palette:
 *   orange  #ff9c00  — primary accent, the classic LCARS amber
 *   peach   #ffcc99  — secondary blocks
 *   lilac   #cc99cc  — tertiary blocks / muted headings
 *   blue    #9999cc  — quaternary
 *   salmon  #cc6666  — danger / alerts
 *   pale    #f5f0e6  — body text (warm off-white, easier than pure #fff)
 */
:root {
	--accent: #ff9c00;
	--accent-2: #ffcc99;
	--accent-3: #cc99cc;
	--accent-4: #9999cc;
	--bg: #000000;
	--fg: #f5f0e6;
	--muted: #b9a98e;
	--card: #16130d;
	--border: #3d3325;
	--danger: #cc6666;
	--lcars-radius: 999px;
}
* { box-sizing: border-box; }
a { color: var(--accent-2); }
a:hover { color: var(--accent); }
body {
	margin: 0 auto;
	max-width: 52rem;
	padding: 0 1rem 3rem;
	font-family: system-ui, sans-serif;
	line-height: 1.55;
	background: var(--bg);
	color: var(--fg);
}
.hero { text-align: center; padding: 2rem 0 1rem; }
/* The h1 stays for SEO / screen readers; the LCARS wordmark is the visual. */
.hero h1.sr-only, .sr-only {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.logo-hero { width: min(44.2rem, 100%); height: auto; display: block; margin: 0 auto 0.75rem; }
.logo-small { width: 1.6rem; height: 1.6rem; vertical-align: -0.4rem; border-radius: 6px; }
html.theme-site:not([data-theme="standard"]) .logo-hero {
	width: min(11.05rem, 25%);
}
nav.forum-nav .brand {
	font-weight: 700; color: var(--fg); text-decoration: none;
	text-transform: uppercase; letter-spacing: 0.08em;
}
nav.forum-nav .brand:hover { text-decoration: underline; }
nav.forum-nav .btn { margin: 0; padding: 0.25rem 0.7rem; font-size: 0.9rem; }
.btn-login { background: var(--accent); color: #000; }
#site-auth { display: inline-flex; align-items: center; gap: 0.5rem; }
.google-box { margin: 0.8rem 0; }
.tagline { color: var(--muted); font-size: 1.15rem; }
.btn {
	display: inline-block;
	padding: 0.5rem 1.2rem;
	margin: 0.2rem;
	border: 1px solid transparent;
	border-radius: var(--lcars-radius);
	color: #000;
	text-decoration: none;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: var(--accent-2);
	font-size: 1rem;
	cursor: pointer;
}
.btn-big { background: var(--accent); color: #000; font-size: 1.15rem; }
.btn-danger { background: var(--danger); color: #000; }
section { margin: 2rem 0; }
/* Wiki pages can carry images (the sanitizer allows src/alt/title and nothing
 * else), so the column has to keep them in check rather than trusting each
 * page to size its own. */
main img { max-width: 100%; height: auto; border-radius: 0.8rem; }
h2 {
	border-bottom: 4px solid var(--accent-3);
	padding-bottom: 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.rules li { margin: 0.6rem 0; }
code, pre {
	background: var(--card);
	border-radius: 4px;
	padding: 0.1rem 0.35rem;
	font-size: 0.95em;
}
pre { padding: 0.7rem; overflow-x: auto; }
table.legend, table.conninfo { border-collapse: collapse; }
table.legend td, table.legend th, table.conninfo td {
	border: 1px solid var(--border);
	padding: 0.3rem 0.8rem;
	text-align: left;
}
details { margin: 0.6rem 0; }
footer { color: var(--muted); text-align: center; margin-top: 3rem; font-size: 0.9rem; }

/* forum SPA */
.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.8rem 1rem;
	margin: 0.6rem 0;
}
.card h3 { margin: 0 0 0.3rem; }
.meta { color: var(--muted); font-size: 0.85rem; }
.post { border-left: 3px solid var(--border); }
.post.op-post { border-left-color: var(--accent); }
.banner {
	background: #8b2f2f22;
	border: 1px solid var(--danger);
	border-radius: 8px;
	padding: 0.6rem 1rem;
	margin: 0.8rem 0;
}
form.stack { display: flex; flex-direction: column; gap: 0.5rem; max-width: 26rem; }
form.stack details { border: 1px dashed var(--border); border-radius: 8px; padding: 0.5rem 0.8rem; }
form.stack details summary { cursor: pointer; color: var(--muted); }
form.stack details input, form.stack details select { display: block; width: 100%; margin: 0.5rem 0; }
form.stack input, form.stack select, form.stack textarea, .composer textarea {
	padding: 0.45rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}
.composer textarea { width: 100%; min-height: 6rem; }
nav.forum-nav {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
	padding: 0.8rem 0;
	border-bottom: 6px solid var(--accent);
}
nav.forum-nav > a:not(.brand):not(.btn) {
	color: var(--accent-2);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none;
}
nav.forum-nav > a:not(.brand):not(.btn):hover { color: var(--accent); text-decoration: none; }
nav.forum-nav .spacer { flex: 1; }
.error { color: var(--danger); }
.votebar { background: var(--border); border-radius: 6px; height: 0.6rem; overflow: hidden; }
.votebar > div { background: var(--accent); height: 100%; }

/* WYSIWYG editor */
.wysiwyg-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	padding: 0.4rem;
	border: 1px solid var(--border);
	border-bottom: none;
	border-radius: 6px 6px 0 0;
	background: var(--card);
}
.wysiwyg-btn {
	border: 1px solid var(--border);
	background: var(--bg);
	color: var(--fg);
	border-radius: 4px;
	padding: 0.2rem 0.5rem;
	cursor: pointer;
	font-size: 0.85rem;
}
.wysiwyg-btn:hover { background: var(--accent); color: #000; }
.wysiwyg-area {
	border: 1px solid var(--border);
	border-radius: 0 0 6px 6px;
	padding: 0.7rem;
	min-height: 8rem;
	background: var(--bg);
	color: var(--fg);
}
.wysiwyg-area:focus { outline: 2px solid var(--accent); }
.wysiwyg-area img { max-width: 100%; }
.post-body img { max-width: 100%; }
.post-body pre { white-space: pre-wrap; }
label { font-weight: 600; font-size: 0.9rem; }

/* profiles & webcam-only photos */
.user-link { text-decoration: none; color: inherit; }
.user-link:hover strong { text-decoration: underline; }
.avatar {
	width: 9rem;
	height: 9rem;
	object-fit: cover;
	border-radius: 12px;
	border: 1px solid var(--border);
	display: block;
}
.avatar-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--card);
	color: var(--muted);
	font-size: 0.9rem;
}
.photo-box { margin: 0.5rem 0 1.5rem; }
.photo-box video {
	width: 20rem;
	max-width: 100%;
	border-radius: 12px;
	border: 1px solid var(--border);
	display: block;
	transform: scaleX(-1); /* mirror the live preview like a mirror; the saved photo is not flipped */
}
.interests { white-space: pre-wrap; }
.recovery-codes { font-size: 1.05rem; letter-spacing: 0.06em; user-select: all; }
/* the password-recovery mascot donkey */
.recover-donkey {
	display: block;
	width: 100%;
	max-width: 15rem;
	margin: 0.5rem auto 1rem;
}
.inline-email { display: inline-flex; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap; }
.inline-email input { padding: 0.3rem 0.5rem; }
.home-ad { display: block; margin: 1rem 0 1.5rem; min-height: 90px; text-align: center; }
.home-ad ins { display: block; }
.apk-count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.wysiwyg-source {
	width: 100%;
	min-height: 8rem;
	border: 1px solid var(--border);
	border-radius: 0 0 6px 6px;
	padding: 0.7rem;
	background: var(--bg);
	color: var(--fg);
	font-family: ui-monospace, monospace;
	font-size: 0.85rem;
	line-height: 1.5;
}
.wysiwyg-btn-on { background: var(--accent); color: #000; }
.wysiwyg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.wysiwyg-area details, .post-body details { margin: 0.4rem 0; }
.wysiwyg-area summary, .post-body summary { cursor: pointer; font-weight: 600; }
.post-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.post-avatar {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 2rem; height: 2rem; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
	background: var(--accent); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.post-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reactions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.react-btn, .react-add {
	border: 1px solid var(--border); background: var(--bg); color: var(--fg);
	border-radius: 999px; padding: 0.12rem 0.55rem; cursor: pointer;
	font-size: 0.95rem; line-height: 1.5;
}
.react-btn:hover, .react-add:hover { background: var(--card); }
.react-mine { border-color: var(--accent); background: var(--card); }
.react-count { margin-left: 0.25rem; font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.react-add { color: var(--muted); }
.notif-bell { position: relative; }
.notif-badge {
	position: absolute; top: -0.4rem; right: -0.4rem; background: var(--danger);
	color: #fff; border-radius: 999px; font-size: 0.65rem; font-weight: 700;
	padding: 0.05rem 0.35rem; min-width: 1rem; text-align: center; line-height: 1.3;
}
.notif-unseen { border-left: 3px solid var(--accent); }
.forum-search { display: flex; gap: 0.4rem; margin: 0.6rem 0 1rem; max-width: 30rem; }
.forum-search input {
	flex: 1; padding: 0.45rem; border: 1px solid var(--border);
	border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit;
}
.post-body blockquote, .wysiwyg-area blockquote {
	border-left: 3px solid var(--border); margin: 0.4rem 0; padding: 0.3rem 0.8rem;
	color: var(--muted); background: var(--card); border-radius: 4px;
}
/* ops control panel */
.panel-tabs { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.6rem 0 1rem; border-bottom: 1px solid var(--border); }
.panel-tab { padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-bottom: none;
	border-radius: 6px 6px 0 0; background: var(--bg); color: var(--fg); text-decoration: none; font-size: 0.95rem; }
.panel-tab.active { background: var(--card); font-weight: 700; border-color: var(--accent); }
.panel-stats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.panel-stat { display: flex; flex-direction: column; align-items: center; min-width: 6rem;
	padding: 0.7rem 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card);
	text-decoration: none; color: var(--fg); }
.panel-stat-n { font-size: 1.6rem; font-weight: 800; }
.panel-stat-l { font-size: 0.8rem; color: var(--muted); }
.panel-row { padding: 0.35rem 0; border-bottom: 1px solid var(--border); display: block; }
.panel-row.dim { opacity: 0.55; }
.panel-audit-row { padding: 0.2rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.6rem 0; }
.panel-inline { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.panel-inline input, .panel-inline select { padding: 0.35rem; border: 1px solid var(--border);
	border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.btn-sm { padding: 0.1rem 0.5rem; font-size: 0.85rem; }
.pill { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.75rem;
	font-weight: 700; background: var(--border); color: var(--fg); }
.pill-on { background: #c0392b; color: #fff; }

/* --- op roster on the landing page ------------------------------------- */
.ops-roster { margin: 2.5rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.ops-roster h2 { margin-bottom: 0.3rem; }
.ops-intro { color: var(--muted); max-width: 46rem; margin-bottom: 1.4rem; }
.op-rank { margin-bottom: 1.4rem; }
.op-rank h3 { margin: 0 0 0.15rem; font-size: 1.05rem; }
.op-rank-blurb { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.6rem; }
.op-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.op-card {
	display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.8rem 0.45rem 0.45rem;
	border: 1px solid var(--border); border-radius: 999px; background: var(--card);
	text-decoration: none; color: var(--fg);
}
.op-card:hover, .op-card:focus-visible { border-color: var(--accent); background: var(--bg); }
.op-avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; flex: none; background: var(--border); }
.op-name { font-weight: 700; }
.op-role { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.op-rank[data-role="admin"] .op-card { border-color: var(--accent); }
.ops-members { color: var(--muted); max-width: 46rem; }
.core-notice { border-left: 3px solid var(--accent); }
.core-notice p { margin: 0.3rem 0; }

/* --- profile interest showcase ------------------------------------------ */
.showcase { margin: 0.8rem 0; }
.showcase-sec { margin-top: 1.1rem; }
.showcase-sec h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.showcase-now { margin: 0.4rem 0 0.6rem; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0.3rem 0; }
.tag {
	display: inline-block; padding: 0.12rem 0.6rem; border-radius: 999px;
	background: var(--card); border: 1px solid var(--border); font-size: 0.85rem;
}
.tag-lang { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.project-list, .link-list { margin: 0.3rem 0; padding-left: 1.1rem; }
.project-list li, .link-list li { margin: 0.2rem 0; }
.project-name { font-weight: 700; }
.project-blurb { color: var(--muted); }
.showcase-rows { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.6rem; align-items: flex-start; }
.showcase-row { display: flex; flex-wrap: wrap; gap: 0.35rem; width: 100%; align-items: flex-start; }
.showcase-row input, .showcase-row textarea {
	flex: 1 1 8rem; min-width: 0; padding: 0.35rem; border: 1px solid var(--border);
	border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit;
}

/* --- LCARS console frame (the forum) ------------------------------------ */
body.lcars { max-width: 68rem; padding-bottom: 1.5rem; }
.lcars-frame {
	display: grid;
	grid-template-columns: 8.5rem 1fr;
	grid-template-rows: 3rem 1fr;
	min-height: calc(100vh - 2.5rem);
	margin-top: 1rem;
}
/* The elbow: outer corner rounded, inner curve cut by the ::after swatch. */
.lcars-elbow {
	position: relative;
	background: var(--accent);
	border-radius: 2.6rem 0 0 0;
	text-decoration: none;
	display: block;
}
.lcars-elbow::after {
	content: "";
	position: absolute;
	right: 0; bottom: -1px;
	width: 2rem; height: 1.4rem;
	background: var(--bg);
	border-radius: 1.1rem 0 0 0;
}
.elbow-label {
	position: absolute; left: 1.1rem; bottom: 0.35rem;
	color: #000; font-weight: 800; letter-spacing: 0.06em; font-size: 1.05rem;
}
.lcars-elbow:hover { background: var(--accent-2); }
.lcars-topbar {
	display: flex; align-items: stretch; gap: 0.4rem;
	padding: 0 0 0.55rem 0.4rem;
}
.lcars-topbar .seg { display: block; }
.lcars-topbar .seg-cap { border-radius: 0 999px 999px 0; }
.lcars-title {
	flex: 0 0 auto; align-self: center;
	color: var(--accent);
	text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700;
	font-size: 0.95rem; padding: 0 0.4rem;
}
/* The rail: navigation as console keys, then a spine down to the end cap. */
.lcars-rail { display: flex; flex-direction: column; gap: 0.35rem; }
.rail-btn {
	display: block;
	color: #000;
	text-decoration: none;
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-align: right;
	padding: 0.7rem 0.8rem 0.7rem 0.4rem;
}
.rail-btn:hover { filter: brightness(1.18); color: #000; }
.rail-who {
	color: var(--muted); font-size: 0.85rem; text-align: right;
	padding: 0.4rem 0.8rem 0.4rem 0;
	overflow-wrap: anywhere;
}
.rail-who a { display: inline-block; margin: 0.15rem 0; }
.rail-fill { flex: 1; min-height: 2rem; background: var(--card); }
.rail-block {
	color: #000; font-weight: 700; font-size: 0.8rem;
	text-align: right; padding: 0.45rem 0.8rem 0.45rem 0;
}
.rail-end { height: 1.6rem; background: var(--accent); border-radius: 0 0 0 2rem; }
.lcars-main { padding: 0.4rem 0 0 1rem; min-width: 0; }
/* Console blinkenlights; stilled for prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
	@keyframes lcars-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0.35; } }
	.blink-a { animation: lcars-blink 2.3s infinite; }
	.blink-b { animation: lcars-blink 3.1s infinite 0.9s; }
	.blink-c { animation: lcars-blink 4.7s infinite 1.7s; }
}
/* Panels: LCARS side-cap cards, caps cycling through the palette. */
body.lcars .card {
	border: 0;
	border-left: 1rem solid var(--accent-2);
	border-radius: 0 1.3rem 1.3rem 0;
}
body.lcars #app > .card:nth-of-type(4n+2) { border-left-color: var(--accent-3); }
body.lcars #app > .card:nth-of-type(4n+3) { border-left-color: var(--accent); }
body.lcars #app > .card:nth-of-type(4n)   { border-left-color: var(--accent-4); }
/* Headers: text then a bar running out to a rounded end. */
body.lcars h2 {
	border: 0; display: flex; align-items: center; gap: 0.7rem; padding: 0;
}
body.lcars h2::after {
	content: ""; flex: 1; height: 0.55em; min-width: 3rem;
	background: var(--accent-3); border-radius: 999px;
}
body.lcars h3 { text-transform: uppercase; letter-spacing: 0.04em; }
/* Narrow screens: the rail folds into a top strip and the elbow steps aside. */
@media (max-width: 46rem) {
	.lcars-frame { display: block; }
	.lcars-elbow, .lcars-topbar, .rail-fill, .rail-block, .rail-end { display: none; }
	.lcars-rail { flex-direction: row; flex-wrap: wrap; align-items: center; border-bottom: 4px solid var(--accent); padding-bottom: 0.4rem; }
	.rail-btn { border-radius: 999px; padding: 0.35rem 0.9rem; }
	.rail-who { margin-left: auto; }
	.lcars-main { padding: 0.6rem 0 0; }
}

/* --- the Starlink #asperger box (home page) ------------------------------ */
.starlink-box {
	border: 1px solid var(--border);
	border-left: 1rem solid var(--accent-4);
	border-radius: 0 1.3rem 1.3rem 0;
	background: var(--card);
	padding: 1rem 1.3rem 1.2rem;
	margin: 2rem 0 0;
	max-width: 46rem;
}
.starlink-box h2 { border: 0; margin: 0 0 0.5rem; font-size: 1.15rem; }
.starlink-box p { margin: 0.5rem 0; }
/* Unfinished feature, said out loud rather than left to be discovered by
 * clicking. The badge names it in the heading; the button keeps its shape so
 * the row still lines up, but is visibly inert and is a <span>, so it cannot
 * be clicked, tabbed to, or followed by a screen reader as a link. */
.wip-badge {
	display: inline-block;
	vertical-align: 0.15em;
	margin-left: 0.4rem;
	padding: 0.05rem 0.6rem;
	border-radius: 999px;
	background: var(--accent-4);
	color: #000;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.btn-disabled {
	background: var(--border);
	color: var(--muted);
	cursor: not-allowed;
	opacity: 0.85;
}
.btn-sub {
	display: block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	opacity: 0.75;
	margin-top: -0.15rem;
}

/* --- rows of buttons ----------------------------------------------------
 * Buttons are inline-block, so a plain row of them baseline-aligns: one
 * carrying a .btn-sub is two lines tall, a .btn-big is a larger font than a
 * .btn, and the result is ragged tops and bottoms. Flex with stretch puts
 * every button in the row on the same top and bottom edge whatever is inside
 * it, and centres each label within its own box.
 */
.btn-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
}
.btn-row .btn {
	margin: 0;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}
/* The landing-page call to action. Four buttons of very different label
 * lengths sat on one 800px row with the last one orphaned onto a second line,
 * off to itself. A flex-basis wide enough that three can never share a row
 * settles them into a tidy 2x2 of equal boxes, collapsing to a single column
 * on a phone.
 */
.hero-actions {
	justify-content: center;
	margin: 1.1rem 0 0;
}
.hero-actions .btn {
	flex: 1 1 17rem;
	max-width: 22rem;
	/* Tall enough that the one button carrying a .btn-sub does not make its
	 * row taller than the other, so all four boxes are identical. */
	min-height: 3.9rem;
}

/* --- theme framework --------------------------------------------------- */
.theme-picker {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font: 700 0.78rem/1.2 system-ui, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.theme-picker label { color: var(--muted); }
.theme-picker select {
	max-width: 10.5rem;
	padding: 0.3rem 1.7rem 0.3rem 0.5rem;
	border: 1px solid var(--border);
	border-radius: 0.45rem;
	background: var(--card);
	color: var(--fg);
	font: 600 0.82rem/1.2 system-ui, sans-serif;
	cursor: pointer;
}
.theme-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lcars-rail .theme-picker {
	flex-direction: column;
	align-items: stretch;
	padding: 0.45rem 0.5rem;
}
.lcars-rail .theme-picker label { text-align: right; }

/* Every alternate theme is deliberately independent of the Standard LCARS
 * presentation.  New themes inherit this ordinary navigation and card frame;
 * their own file only has to define tokens and character.
 */
html.theme-site:not([data-theme="standard"]) body.lcars {
	max-width: 72rem;
	padding-bottom: 2rem;
}
html.theme-site:not([data-theme="standard"]) .lcars-frame {
	display: block;
	min-height: calc(100vh - 2rem);
}
html.theme-site:not([data-theme="standard"]) .lcars-elbow {
	display: inline-flex;
	align-items: center;
	width: auto;
	min-height: 2.6rem;
	margin: 0 0 0.5rem;
	padding: 0.45rem 1rem;
	border: 1px solid var(--border);
	border-radius: 0.7rem;
	background: var(--card);
}
html.theme-site:not([data-theme="standard"]) .lcars-elbow::after { display: none; }
html.theme-site:not([data-theme="standard"]) .elbow-label {
	position: static;
	color: var(--accent);
	font: 800 1rem/1 system-ui, sans-serif;
}
html.theme-site:not([data-theme="standard"]) .lcars-topbar,
html.theme-site:not([data-theme="standard"]) .rail-fill,
html.theme-site:not([data-theme="standard"]) .rail-block,
html.theme-site:not([data-theme="standard"]) .rail-end {
	display: none;
}
html.theme-site:not([data-theme="standard"]) .lcars-rail {
	display: flex;
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.45rem;
	padding: 0.55rem;
	border: 1px solid var(--border);
	border-radius: 0.8rem;
	background: var(--card);
}
html.theme-site:not([data-theme="standard"]) .rail-btn {
	padding: 0.45rem 0.8rem;
	border-radius: 0.55rem;
	text-align: center;
}
html.theme-site:not([data-theme="standard"]) .rail-who {
	margin-left: auto;
	padding: 0.3rem;
	text-align: left;
}
html.theme-site:not([data-theme="standard"]) .lcars-rail .theme-picker {
	flex-direction: row;
	align-items: center;
	padding: 0.2rem;
}
html.theme-site:not([data-theme="standard"]) .lcars-main { padding: 0.8rem 0 0; }
html.theme-site:not([data-theme="standard"]) body.lcars .card {
	border: 1px solid var(--border);
	border-left: 0.35rem solid var(--accent-2);
	border-radius: 0.75rem;
}
html.theme-site:not([data-theme="standard"]) body.lcars h2::after { display: none; }
html.theme-site:not([data-theme="standard"]) nav.forum-nav {
	margin-top: 0.6rem;
	padding: 0.65rem;
	border: 1px solid var(--border);
	border-radius: 0.8rem;
}

@media (max-width: 46rem) {
	.theme-picker { width: 100%; justify-content: flex-end; }
	.lcars-rail .theme-picker { width: auto; }
	html.theme-site:not([data-theme="standard"]) .lcars-elbow { display: inline-flex; }
	html.theme-site:not([data-theme="standard"]) .lcars-rail .theme-picker {
		width: 100%; justify-content: flex-start;
	}
}

/* --- the elected president (home page) ---------------------------------- */
.president-card {
	border-left: 1rem solid var(--accent);
	border-radius: 0 1.3rem 1.3rem 0;
	background: var(--card);
	padding: 0.9rem 1.2rem;
	margin: 0 0 1.4rem;
	max-width: 46rem;
}
.president-label {
	margin: 0; color: var(--muted); text-transform: uppercase;
	letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700;
}
.president-name { margin: 0.1rem 0 0.3rem; font-size: 1.5rem; font-weight: 800; }
.president-name a { color: var(--accent); text-decoration: none; }
.president-name a:hover { text-decoration: underline; }
.president-card p.meta { margin: 0; }
/* the election page */
.candidate-card { border-left: 1rem solid var(--accent-3); border-radius: 0 1.3rem 1.3rem 0; }
.candidate-card.mine { border-left-color: var(--accent); }
.ballot-bar { background: var(--border); border-radius: 6px; height: 0.6rem; overflow: hidden; margin-top: 0.3rem; }
.ballot-bar > div { background: var(--accent); height: 100%; }
