/* Trust Fund Platform — 2026 theme */

/*
 * Color system: blue = trust/structure (nav, links, headings, the hero
 * backdrop) — a true civic blue, deliberately NOT the violet-leaning
 * indigo (#3d5af1) this used to be, which reads as generic tech-startup
 * branding rather than institutional trust. Coral/orange = the one thing
 * we want you to do (donate, progress toward a goal, impact numbers) —
 * warm and complementary to the blue, so it's the only thing that pops.
 * Don't blur this line by using accent for structural chrome or primary
 * for calls to action — the whole point is that there are only two
 * colors doing real work, each with one job.
 */
:root {
	--color-bg: #f5f6f8;
	--color-surface: #ffffff;
	--color-border: #e2e5ea;
	--color-text: #1c1f26;
	--color-text-muted: #666e7a;
	--color-primary: #1e56c8;
	--color-primary-dark: #163f96;
	--color-accent: #d9551f;
	--color-accent-dark: #b8461a;
	--color-success-bg: #e8f8ee;
	--color-success-text: #14804a;
	--color-error-bg: #fdecea;
	--color-error-text: #c0392b;
	--color-info-bg: #eaf2ff;
	--color-info-text: #1e56c8;
	--radius: 10px;
	--radius-sm: 6px;
	--shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
	--font-sans: -apple-system, "Segoe UI", "Inter", system-ui, Roboto, Helvetica, Arial, sans-serif;
}

/*
 * Theme resolution: 'auto' (default, no [data-theme] attribute) follows
 * the OS via prefers-color-scheme, guarded with :not([data-theme=...])
 * so an explicit user choice always wins over the OS setting. 'light'
 * and 'dark' are the same two palettes as auto, just forced either way
 * regardless of OS. 'neutral' is a third, deliberately muted palette
 * (desaturated slate + ochre instead of civic blue + coral) that doesn't
 * branch on OS preference at all — a quiet option for anyone who finds
 * the brighter trust-blue/action-coral pairing too loud.
 */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]):not([data-theme="neutral"]) {
		--color-bg: #14161a;
		--color-surface: #1c1f26;
		--color-border: #2c313b;
		--color-text: #eceef1;
		--color-text-muted: #9aa2b0;
		--color-primary: #6f9bf0;
		--color-primary-dark: #9dbdf7;
		--color-accent: #ff8a5c;
		--color-accent-dark: #ffab85;
		--color-success-bg: #0f2b1e;
		--color-success-text: #4ade80;
		--color-error-bg: #2e1614;
		--color-error-text: #f87171;
		--color-info-bg: #16233b;
		--color-info-text: #6f9bf0;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
	}
}

:root[data-theme="dark"] {
	--color-bg: #14161a;
	--color-surface: #1c1f26;
	--color-border: #2c313b;
	--color-text: #eceef1;
	--color-text-muted: #9aa2b0;
	--color-primary: #6f9bf0;
	--color-primary-dark: #9dbdf7;
	--color-accent: #ff8a5c;
	--color-accent-dark: #ffab85;
	--color-success-bg: #0f2b1e;
	--color-success-text: #4ade80;
	--color-error-bg: #2e1614;
	--color-error-text: #f87171;
	--color-info-bg: #16233b;
	--color-info-text: #6f9bf0;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
	--color-bg: #f5f6f8;
	--color-surface: #ffffff;
	--color-border: #e2e5ea;
	--color-text: #1c1f26;
	--color-text-muted: #666e7a;
	--color-primary: #1e56c8;
	--color-primary-dark: #163f96;
	--color-accent: #d9551f;
	--color-accent-dark: #b8461a;
	--color-success-bg: #e8f8ee;
	--color-success-text: #14804a;
	--color-error-bg: #fdecea;
	--color-error-text: #c0392b;
	--color-info-bg: #eaf2ff;
	--color-info-text: #1e56c8;
	--shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}

:root[data-theme="neutral"] {
	--color-bg: #f2f1ee;
	--color-surface: #ffffff;
	--color-border: #ddd9d2;
	--color-text: #2b2a28;
	--color-text-muted: #7a766e;
	--color-primary: #4a5568;
	--color-primary-dark: #333a46;
	--color-accent: #8a6d3b;
	--color-accent-dark: #6b5429;
	--color-success-bg: #eef1ea;
	--color-success-text: #4f7942;
	--color-error-bg: #f4e8e6;
	--color-error-text: #9c4a3c;
	--color-info-bg: #e9edf1;
	--color-info-text: #4a5568;
	--shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
}

body {
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}
a:hover { text-decoration: underline; }

.container#page {
	max-width: 1040px;
	margin: 32px auto;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

#header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 28px;
	border-bottom: 1px solid var(--color-border);
}

#logo a {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--color-text);
	letter-spacing: -0.01em;
	display: flex;
	align-items: center;
	gap: 10px;
}
#logo a:hover { text-decoration: none; color: var(--color-primary); }
#fund-logo { height: 32px; width: 32px; object-fit: cover; border-radius: var(--radius-sm); }
#fund-logo-name { font-size: 1.1rem; }

/* Single consolidated top bar: plain nav links, plus zero-JS <details>
   dropdowns for theme/language/account so a whole second menu row
   (the old #mainmenu) isn't needed. */
.navbar {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: wrap;
}
.navbar > a, .navbar summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	color: var(--color-text-muted);
	font-weight: 600;
	font-size: 0.88rem;
	cursor: pointer;
	list-style: none;
	white-space: nowrap;
}
.navbar summary::-webkit-details-marker { display: none; }
.navbar > a:hover, .navbar summary:hover { color: var(--color-text); background: var(--color-border); text-decoration: none; }

.navbar details { position: relative; }
.navbar details[open] > summary { color: var(--color-text); background: var(--color-border); }
.navbar .dropdown-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	min-width: 170px;
	padding: 6px;
	z-index: 60;
}
.navbar .dropdown-menu a {
	display: block;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-weight: 500;
	font-size: 0.88rem;
}
.navbar .dropdown-menu a:hover { background: var(--color-border); text-decoration: none; }
.navbar .dropdown-menu a.dropdown-current { color: var(--color-accent); font-weight: 700; }
.navbar .dropdown-menu .dropdown-note {
	padding: 6px 10px 8px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: 0.8rem;
}
.navbar .badge-count {
	background: var(--color-accent);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	border-radius: 999px;
	padding: 1px 6px;
	line-height: 1.3;
}

/* Donor quick-nav bar (layouts/donor.php). Structural nav, so --color-primary,
   not --color-accent. Margin sits on the element itself — #content is one level
   below #page, so a "#page > x" rule would never match (see CLAUDE.md CSS trap). */
.donor-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 18px 28px 0;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--color-border);
}
.donor-nav a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 12px;
	border-radius: var(--radius-sm);
	color: var(--color-text-muted);
	font-weight: 600;
	font-size: 0.86rem;
	white-space: nowrap;
}
.donor-nav a:hover { color: var(--color-text); background: var(--color-border); text-decoration: none; }
.donor-nav a.active { color: #fff; background: var(--color-primary); }
.donor-nav a.active:hover { color: #fff; background: var(--color-primary-dark); }
.donor-nav a i { font-size: 0.9em; }

/* Share row (_share.php) — network icons + copy-link button. Icons use the
   structural/nav color; the copy button is an action, so --color-accent. */
.share-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0;
}
.share-row-label { font-size: 0.85rem; color: var(--color-text-muted); font-weight: 600; }
.share-row > a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	color: var(--color-primary);
	font-size: 0.95rem;
}
.share-row > a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); text-decoration: none; }
.share-row .share-copy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-accent);
	background: transparent;
	color: var(--color-accent);
	font: inherit;
	font-size: 0.83rem;
	font-weight: 600;
	cursor: pointer;
}
.share-row .share-copy:hover { background: var(--color-accent); color: #fff; }

.breadcrumbs {
	padding: 12px 28px 0;
	font-size: 0.85rem;
	color: var(--color-text-muted);
}
.breadcrumbs ul { list-style: none; margin: 0; padding: 0; display: inline; }
.breadcrumbs li { display: inline; }
.breadcrumbs li:after { content: " \203A "; color: var(--color-text-muted); }
.breadcrumbs li:last-child:after { content: ""; }
.breadcrumbs li.active { color: var(--color-text); font-weight: 600; }

.flash-success, .flash-error, .flash-info {
	margin: 20px 28px 0;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	font-size: 0.92rem;
	font-weight: 500;
}
.flash-success { background: var(--color-success-bg); color: var(--color-success-text); }
.flash-error { background: var(--color-error-bg); color: var(--color-error-text); }
.flash-info { background: var(--color-info-bg); color: var(--color-info-text); }

h1 {
	font-size: 1.7rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 24px 28px 12px;
}
h2 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 28px 28px 10px;
}
h3 { font-size: 1.05rem; font-weight: 600; margin: 16px 28px 6px; }

p { margin: 0 28px 12px; color: var(--color-text); }
p small, h3 small { color: var(--color-text-muted); font-weight: 400; font-size: 0.82em; }

ul, ol { margin: 0 28px 12px; padding-left: 22px; }
li { margin-bottom: 4px; }

hr { border: none; border-top: 1px solid var(--color-border); margin: 24px 0; }

code, kbd {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: 4px;
	padding: 1px 5px;
	font-size: 0.88em;
}

/* Tables */
table.items {
	width: calc(100% - 56px);
	margin: 8px 28px 24px;
	border-collapse: collapse;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	overflow: hidden;
}
table.items th, table.items td {
	text-align: left;
	padding: 10px 14px;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.92rem;
}
table.items th {
	background: var(--color-bg);
	color: var(--color-text-muted);
	font-weight: 600;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
table.items tr:last-child td { border-bottom: none; }
table.items tr:hover td { background: var(--color-bg); }

/* A table.items nested inside .form/.update already sits inside that
   container's own inset — don't double the horizontal margin. Same for a
   <form> nested inside a table cell (e.g. an inline role-picker). */
.form table.items, .update table.items { margin-left: 0; margin-right: 0; }
table.items form { margin: 0; }

/* Forms */
.form, form { margin: 0 28px 20px; }
.form form { margin: 0; } /* CActiveForm renders a <form> inside .form — avoid doubling the margin */
.row { margin-bottom: 16px; }
.row label, label {
	display: block;
	font-weight: 600;
	font-size: 0.85rem;
	margin-bottom: 5px;
	color: var(--color-text);
}
.row label .required, label .required { color: var(--color-error-text); margin-left: 2px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=file], input[type=date], select, textarea {
	width: 100%;
	max-width: 420px;
	padding: 9px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: var(--color-surface);
	color: var(--color-text);
	font-family: inherit;
	font-size: 0.92rem;
}
textarea { max-width: 560px; }
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}
input.error, select.error, textarea.error { border-color: var(--color-error-text); }

.errorMessage, .error {
	color: var(--color-error-text);
	font-size: 0.82rem;
	margin-top: 4px;
}
.errorSummary {
	background: var(--color-error-bg);
	color: var(--color-error-text);
	border-radius: var(--radius-sm);
	padding: 12px 16px;
	margin-bottom: 16px;
}
.errorSummary ul { margin: 4px 0 0; padding-left: 18px; }

.note, .hint { color: var(--color-text-muted); font-size: 0.85rem; }

/* Buttons — the accent color, deliberately: every button is an action
   (submit, allocate, vote, save), and the CTA color is what makes an
   action feel like an action instead of a link. */
input[type=submit], button, .button {
	appearance: none;
	background: var(--color-accent);
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-weight: 600;
	font-size: 0.92rem;
	cursor: pointer;
}
input[type=submit]:hover, button:hover, .button:hover {
	background: var(--color-accent-dark);
	text-decoration: none;
}

/* Content cards (tickets, bank import lines, city blocks) */
.update {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 16px 20px;
	margin: 0 28px 16px;
}
.update h2, .update h3, .update p, .update ul, .update ol { margin-left: 0; margin-right: 0; }
.update h2, .update h3 { margin-top: 0; }
.update form { margin: 0; }

#footer {
	padding: 18px 28px;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: 0.8rem;
}

.clear { clear: both; }

@media (max-width: 640px) {
	.container#page { margin: 0; border-radius: 0; border-left: none; border-right: none; }
	#header { flex-direction: column; align-items: flex-start; gap: 10px; }
	table.items { display: block; overflow-x: auto; width: auto; }
}

/* Cause cards (funds/projects with an image + progress bar) */
.cause-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
	margin: 8px 28px 28px;
}
.cause-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cause-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cause-card-image {
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 1.6rem;
	font-weight: 700;
	overflow: hidden;
}
.cause-card-image img { width: 100%; height: 100%; object-fit: cover; }
.cause-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cause-card-title { font-weight: 700; font-size: 1rem; color: var(--color-text); }
.cause-card-title a { color: inherit; }
.cause-card-meta { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.cause-card-amounts { font-size: 0.85rem; color: var(--color-text-muted); margin-top: auto; }
.cause-card-amounts strong { color: var(--color-text); }

/* A fund's own page reads as that fund's page, not a scaled-down copy of
   the platform homepage's .hero — same surface/border language as the
   rest of the app, no bold color banner, logo/name/description given
   real weight instead of being squeezed above a bare project list. */
.fund-header {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--color-border);
}
.fund-header-logo {
	width: 84px;
	height: 84px;
	flex-shrink: 0;
	border-radius: var(--radius);
	overflow: hidden;
	background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 2rem;
	font-weight: 700;
}
.fund-header-logo img { width: 100%; height: 100%; object-fit: cover; }
a.fund-header-logo:hover { text-decoration: none; opacity: 0.88; }
.fund-header-body h1 { margin: 0 0 6px; }
.fund-header-meta { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 10px; }
.fund-header-description { max-width: 640px; color: var(--color-text); }

/* Compact variant: the same fund header sitting on top of a *project*
   page. The fund stays recognisable (logo, name, pages) but yields the
   page to the project — smaller logo, h2-sized name, description
   clamped to two lines. */
.fund-header.compact { gap: 14px; padding-bottom: 14px; margin-bottom: 22px; }
.fund-header.compact .fund-header-logo { width: 52px; height: 52px; font-size: 1.3rem; }
.fund-header.compact .fund-header-body h2 { margin: 0 0 4px; font-size: 1.15rem; }
.fund-header.compact .fund-header-body h2 a { color: var(--color-primary); }
.fund-header.compact .fund-header-meta { margin-bottom: 6px; font-size: 0.82rem; }
.fund-header.compact .fund-header-description {
	font-size: 0.88rem;
	color: var(--color-text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
}

/* A fund's CMS pages (page/_menu.php) — a slim pill nav right under the
   fund's own title, so its content pages read as part of that fund's
   page, not a buried admin-only list. */
.fund-header-body .page-menu,
.fund-header-body .page-menu ul {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.fund-header-body .page-menu ul { margin: 6px 0 0 14px; width: 100%; }
.fund-header-body .page-menu a {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: 0.8rem;
	font-weight: 600;
}
.fund-header-body .page-menu a:hover { color: var(--color-primary); border-color: var(--color-primary); text-decoration: none; }

.progress-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	overflow: hidden;
	margin: 4px 0;
}
.progress-fill { height: 100%; background: var(--color-accent); border-radius: 999px; }

/* Landing hero */
.hero {
	margin: -1px -1px 0;
	padding: 56px 28px;
	background:
		radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--color-primary) 30%, transparent), transparent 45%),
		linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
	color: #fff;
	text-align: center;
}
.hero h1 { margin: 0 0 12px; font-size: 2.2rem; color: #fff; }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.05rem; max-width: 560px; margin: 0 auto 22px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .button, .hero input[type=submit] { background: var(--color-accent); color: #fff; }
.hero .button:hover { background: var(--color-accent-dark); }
.hero .button-outline {
	display: inline-block;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(255,255,255,0.6);
	color: #fff;
	font-weight: 600;
	font-size: 0.92rem;
}
.hero .button-outline:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

.stats-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
	margin: 28px 28px;
}
.stat-tile {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	padding: 16px;
	text-align: center;
}
.stat-tile .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--color-accent); }
.stat-tile .stat-label { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }

/* Milestone charts — deliberately reuse only the two colors the rest of
   this app uses (accent = done/action, primary = in progress/structural),
   plus the neutral border color for "not started yet". No rainbow
   palette, consistent with the "two colors, each with one job" rule. */
.milestone-donut {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	position: relative;
	margin: 0 auto;
}
.milestone-donut::after {
	content: "";
	position: absolute;
	top: 20px; left: 20px; right: 20px; bottom: 20px;
	background: var(--color-surface);
	border-radius: 50%;
}
.milestone-donut-legend { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 12px 28px 0; font-size: 0.85rem; }
.milestone-donut-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

.budget-bar {
	display: flex;
	height: 26px;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	max-width: 560px;
}
.budget-segment { height: 100%; min-width: 2px; }
.budget-segment.status-done { background: var(--color-accent); }
.budget-segment.status-in_progress { background: var(--color-primary); }
.budget-segment.status-planned { background: var(--color-text-muted); opacity: 0.4; }

.feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 18px;
	margin: 8px 28px 28px;
}
.feature-card { padding: 4px 0; }
.feature-card .feature-icon { font-size: 1.6rem; margin-bottom: 6px; }
.feature-card h3 { margin: 0 0 4px; }
.feature-card p { color: var(--color-text-muted); font-size: 0.88rem; margin: 0; }

.section-heading { text-align: center; margin-top: 40px; padding: 0 28px; }
.section-heading h2 { margin-left: 0; margin-right: 0; }
.section-heading p { color: var(--color-text-muted); max-width: 480px; margin: 0 auto; }

/* Rich text editor + rendered rich content */
.ql-editor { min-height: 160px; font-family: var(--font-sans); font-size: 0.92rem; }
.rich-content img { max-width: 100%; border-radius: var(--radius-sm); }
.rich-content { font-size: 0.95rem; }

/* A <button> that needs to read as an inline text link (e.g. a POST-form
   "remove" action sitting inline in a sentence, not a standalone button) */
.link-button {
	appearance: none;
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: var(--color-primary);
	text-decoration: underline;
	cursor: pointer;
}

/* Small inline label, e.g. a file-type or link marker on an attachment */
.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--color-info-bg);
	color: var(--color-info-text);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}


#google_translate_element {
    display: inline-flex;
    align-items: center;
}

.goog-te-gadget {
    font-family: inherit !important;
    font-size: 0 !important;
}

.goog-te-combo {
    margin: 0 !important;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.goog-logo-link,
.goog-te-gadget span {
    display: none !important;
}


#footer {
	padding: 28px;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
	font-size: 0.82rem;
}

.footer-main {
	display: grid;
	grid-template-columns: minmax(260px, 1.4fr) 2fr;
	gap: 56px;
}

.footer-brand {
	max-width: 420px;
}

.footer-brand .footer-name {
	display: block;
	margin-bottom: 8px;
	color: var(--color-text);
	font-size: 1rem;
}

.footer-brand p {
	margin: 0 0 8px;
	color: var(--color-text-muted);
	font-size: 0.82rem;
}

.footer-brand .footer-note {
	font-size: 0.76rem;
}

.footer-nav {
	display: grid;
	grid-template-columns: repeat(3, minmax(100px, 1fr));
	gap: 28px;
}

.footer-column {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
}

.footer-column > strong {
	margin-bottom: 2px;
	color: var(--color-text);
	font-size: 0.78rem;
}

.footer-column a {
	color: var(--color-text-muted);
}

.footer-column a:hover {
	color: var(--color-primary);
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 20px;

	margin-top: 26px;
	padding-top: 18px;

	border-top: 1px solid var(--color-border);

	color: var(--color-text-muted);
	font-size: 0.74rem;
}


/* Google Translate — inherit the application theme */

#footer #google_translate_element {
	display: block;
}

#footer .goog-te-combo {
	width: 100%;
	max-width: 170px;

	margin: 0 !important;
	padding: 7px 10px;

	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);

	background: var(--color-surface);
	color: var(--color-text);

	font-family: var(--font-sans);
	font-size: 0.8rem;
}

#footer .goog-te-combo:hover {
	border-color: var(--color-primary);
}

#footer .goog-te-combo:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px color-mix(
		in srgb,
		var(--color-primary) 20%,
		transparent
	);
}


@media (max-width: 700px) {

	.footer-main {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.footer-nav {
		grid-template-columns: repeat(3, 1fr);
	}

	.footer-bottom {
		flex-direction: column;
		gap: 5px;
	}

}


@media (max-width: 480px) {

	.footer-nav {
		grid-template-columns: 1fr 1fr;
	}

}