@charset "UTF-8";
/* ==========================================================================
   Sandy Creek Cove HOA — site styles
   Mobile-first. Breakpoints: 640px (small tablet), 1024px (one-row desktop header),
   900px (two-column layout).
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
	color-scheme: light dark;

	--bg: #f6f4ef;
	--surface: #ffffff;
	--surface-muted: #f9f7f2;
	--weekend: #eeeae1;
	--text: #1d2621;
	--muted: #59645e;
	--border: #e4dfd3;
	--border-strong: #cfc8b8;

	--brand: #1d3328;
	--brand-ink: #f3ecdc;
	--brand-ink-muted: rgba(243, 236, 220, 0.72);
	--brand-line: rgba(195, 162, 101, 0.35);

	--accent: #2c6646;
	--accent-hover: #22543a;
	--accent-soft: #e7f0ea;
	--on-accent: #ffffff;

	--gold: #c3a265;
	--gold-text: #84672f;
	--gold-soft: #f5eedf;

	--danger: #a8261b;
	--danger-soft: #fbecea;
	--focus: rgba(44, 102, 70, 0.3);

	--shadow-sm: 0 1px 2px rgba(23, 33, 27, 0.05);
	--shadow: 0 1px 2px rgba(23, 33, 27, 0.06), 0 12px 32px -14px rgba(23, 33, 27, 0.22);

	--radius: 16px;
	--radius-sm: 10px;

	--font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-script: "Pinyon Script", "Snell Roundhand", cursive;

	--container: 1120px;
	--gutter: 16px;
	--header-h: 76px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1512;
		--surface: #161e1a;
		--surface-muted: #1b2520;
		--weekend: #222d27;
		--text: #e6ebe7;
		--muted: #a2ada6;
		--border: #26322c;
		--border-strong: #3a4842;

		--brand: #0b120e;

		--accent: #86c9a2;
		--accent-hover: #a5dab9;
		--accent-soft: #1c2c23;
		--on-accent: #0b1a12;

		--gold-text: #d6b97f;
		--gold-soft: #242019;

		--danger: #ff9b8f;
		--danger-soft: #3a1c18;
		--focus: rgba(134, 201, 162, 0.3);

		--shadow-sm: none;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -14px rgba(0, 0, 0, 0.7);
	}
}

@media (min-width: 640px) {
	:root { --gutter: 24px; }
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 16px;
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

img, embed, object, iframe { max-width: 100%; }
img { display: block; height: auto; }

h1, h2, h3 {
	margin: 0 0 0.5em;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--text);
}

p { margin: 0 0 1em; }

a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
a:hover { color: var(--accent-hover); }

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

address { font-style: normal; }

a[href^="tel:"] { white-space: nowrap; }

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

.skip-link {
	position: absolute;
	left: 12px;
	top: -60px;
	z-index: 100;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	box-shadow: var(--shadow);
	font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-left: auto;
	margin-right: auto;
	padding-left: max(var(--gutter), env(safe-area-inset-left));
	padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Header ---------- */
.site-header {
	background: var(--brand);
	color: var(--brand-ink);
	border-bottom: 1px solid var(--brand-line);
}

.header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 24px;
	padding-top: max(12px, env(safe-area-inset-top));
}

.brand {
	display: block;
	padding: 4px 0;
	border-radius: 6px;
}
.brand img { width: 176px; }

.header-user {
	display: none;
	font-size: 0.875rem;
	color: var(--brand-ink-muted);
	white-space: nowrap;
}
.header-user span {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1rem;
	font-style: italic;
	color: var(--gold);
}
.header-user a {
	margin-left: 12px;
	padding: 6px 14px;
	border: 1px solid rgba(243, 236, 220, 0.35);
	border-radius: 999px;
	color: var(--brand-ink);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
}
.header-user a:hover { color: #fff; background: rgba(243, 236, 220, 0.08); }

.header-login {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 6px 16px;
	border: 1px solid rgba(243, 236, 220, 0.35);
	border-radius: 999px;
	color: var(--brand-ink);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}
.header-login:hover { color: #fff; background: rgba(243, 236, 220, 0.08); }

.site-nav {
	order: 3;
	flex: 1 0 100%;
	display: flex;
	gap: 4px;
	margin-top: 4px;
	overflow-x: auto;
	scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 0 8px;
	border-bottom: 3px solid transparent;
	color: var(--brand-ink-muted);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.site-nav a:first-child { margin-left: -8px; }

/* iPhone mini / SE: keep all five tabs on screen. */
@media (max-width: 379px) {
	.site-nav a { font-size: 0.875rem; }
}

/* Six tabs (board members): tighter tabs so the row still fits a phone. */
@media (max-width: 479px) {
	.site-nav-compact { gap: 0; }
	.site-nav-compact a { padding: 0 6px; font-size: 0.875rem; }
	.site-nav-compact a:first-child { margin-left: -6px; }
}
@media (max-width: 379px) {
	.site-nav-compact a { padding: 0 5px; font-size: 0.8125rem; }
	.site-nav-compact a:first-child { margin-left: -5px; }
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] {
	color: #fff;
	border-bottom-color: var(--gold);
}

@media (min-width: 1024px) {
	html { scroll-padding-top: calc(var(--header-h) + 16px); }

	.site-header {
		position: sticky;
		top: 0;
		z-index: 50;
	}
	.header-inner {
		flex-wrap: nowrap;
		min-height: var(--header-h);
		padding-top: 0;
	}
	.brand img { width: 213px; }

	.site-nav {
		order: 0;
		flex: 0 1 auto;
		align-self: stretch;
		margin: 0 0 0 auto;
		overflow: visible;
	}
	.site-nav a {
		min-height: var(--header-h);
		padding: 0 16px;
	}
	.site-nav a:first-child { margin-left: 0; }

	.header-user {
		display: block;
		padding-left: 24px;
		border-left: 1px solid rgba(243, 236, 220, 0.18);
	}
	.header-login { display: none; }
}

/* ---------- Hero (home page) ---------- */
.hero { padding-top: 16px; }

.hero-media {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	border-radius: var(--radius);
	background: var(--brand);
	box-shadow: var(--shadow);
}

.hero-media img {
	width: 100%;
	height: clamp(200px, 40vw, 440px);
	object-fit: cover;
	object-position: 50% 60%;
}

/* Phones: caption sits on a band below the photo so it never covers the sign. */
.hero-caption {
	padding: 14px 20px 18px;
	background: var(--brand);
	color: var(--brand-ink);
}

.hero-title {
	margin: 0;
	font-family: var(--font-script);
	font-size: clamp(3.25rem, 10vw, 6.5rem);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: 0;
	color: var(--brand-ink);
}

.hero-sub {
	margin: 6px 0 0;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold);
}

.hero-sub-name { display: none; }

@media (min-width: 480px) {
	.hero-sub-name { display: inline; }
}

/* Larger screens: caption overlays the photo. */
@media (min-width: 640px) {
	.hero { padding-top: 24px; }

	.hero-media::after {
		content: "";
		position: absolute;
		top: 0; right: 0; bottom: 0; left: 0;
		background: linear-gradient(180deg, rgba(8, 16, 12, 0) 35%, rgba(8, 16, 12, 0.72) 100%);
	}

	.hero-caption {
		position: absolute;
		right: 0; bottom: 0; left: 0;
		z-index: 1;
		padding: 28px 36px 32px;
		background: none;
		color: #fff;
	}
	.hero-title {
		line-height: 0.85;
		color: #fff;
		text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
	}
	.hero-sub {
		margin-top: 8px;
		font-size: 0.8125rem;
		letter-spacing: 0.16em;
		color: rgba(255, 255, 255, 0.9);
	}
}

/* ---------- Page layout ---------- */
.layout {
	flex: 1 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	padding-top: 24px;
	padding-bottom: 48px;
}

.content { min-width: 0; }

/* No sidebar (signed-in residents on the public pages): the content fills the row. */
.layout > .content:only-child { grid-column: 1 / -1; }

@media (min-width: 900px) {
	.layout {
		grid-template-columns: minmax(0, 1fr) 320px;
		gap: 40px;
		align-items: start;
		padding-top: 40px;
		padding-bottom: 72px;
	}
	.sidebar {
		position: sticky;
		top: calc(var(--header-h) + 24px);
	}
}

/* ---------- Page headings & text ---------- */
.page-header { margin-bottom: 20px; }

.eyebrow {
	margin: 0 0 6px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold-text);
}

.page-title {
	margin: 0;
	font-size: clamp(2rem, 6vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.025em;
}

.lead {
	margin: 0 0 24px;
	font-size: 1.1875rem;
	line-height: 1.55;
	color: var(--muted);
}

/* ---------- Cards ---------- */
.card {
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card > :last-child { margin-bottom: 0; }
.card h2 {
	margin-bottom: 10px;
	font-size: 1.3125rem;
}

@media (min-width: 640px) {
	.card { padding: 28px; }
	.card + .card { margin-top: 20px; }
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-outline {
	background: var(--surface);
	border-color: var(--border-strong);
	color: var(--accent);
}
.btn-outline:hover {
	background: var(--accent-soft);
	border-color: var(--accent);
	color: var(--accent);
}

.btn-block { width: 100%; min-height: 48px; }

@media (max-width: 479px) {
	.card .btn:not(.btn-sm) { width: 100%; }
}

/* ---------- Home: quick links ---------- */
.tiles {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	margin-bottom: 24px;
}

@media (min-width: 560px) {
	.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 18px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-sm);
	color: var(--text);
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tile:hover {
	color: var(--text);
	border-color: var(--accent);
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}
.tile-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-weight: 700;
	color: var(--accent);
}
.tile-text {
	font-size: 0.9375rem;
	line-height: 1.45;
	color: var(--muted);
}

/* ---------- Login panel ---------- */
.login-card h2 {
	margin-bottom: 16px;
	font-size: 1.25rem;
}

.field { margin-bottom: 14px; }
.field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 600;
}

.input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 16px; /* 16px+ stops iOS Safari from zooming on focus */
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--focus);
}

.checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin-bottom: 8px;
	font-size: 0.9375rem;
	color: var(--muted);
	cursor: pointer;
}
.checkbox input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--accent);
}

.alert {
	margin-bottom: 16px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	background: var(--danger-soft);
	color: var(--danger);
	font-size: 0.9375rem;
	font-weight: 600;
}

.register {
	margin-top: 20px;
	padding: 16px;
	border-radius: var(--radius-sm);
	background: var(--gold-soft);
}
.register h3 {
	margin: 0 0 6px;
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold-text);
}
.register p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* ---------- Links page ---------- */
.link-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.link-list li {
	padding: 14px 0;
	border-top: 1px solid var(--border);
}
.link-list li:first-child {
	padding-top: 4px;
	border-top: 0;
}
.link-list li:last-child { padding-bottom: 0; }

.link-title {
	font-weight: 600;
	text-decoration: none;
}
.link-title:hover { text-decoration: underline; }

.link-list p,
.link-list address {
	margin: 4px 0 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--muted);
}
.link-list address { margin-top: 10px; }
.link-list address strong { color: var(--text); }

.subhead {
	margin: 20px 0 4px;
	padding-top: 16px;
	border-top: 1px solid var(--border);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gold-text);
}

/* ---------- Plat page ---------- */
.card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
}
.card-head h2 { margin: 0; }

.pdf-frame {
	margin-top: 20px;
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
}
.pdf-frame embed {
	display: block;
	width: 100%;
	height: 72vh;
	min-height: 480px;
}

.pdf-hint {
	display: none;
	margin: 12px 0 0;
	font-size: 0.9375rem;
	color: var(--muted);
}

/* Phones can't scroll or zoom an embedded PDF, so send them to the native viewer. */
@media (max-width: 699px) {
	.pdf-frame { display: none; }
	.pdf-hint { display: block; }
}

/* ---------- Shared helpers ---------- */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.nowrap { white-space: nowrap; }

.btn-sm {
	min-height: 32px;
	padding: 5px 14px;
	font-size: 0.8125rem;
}
.btn-gold { background: var(--gold); color: #1d2621; }
.btn-gold:hover { background: #ad8c50; color: #1d2621; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}
.btn-row-tight { gap: 8px; margin-top: 0; }
.btn-sm svg { width: 15px; height: 15px; }

.card-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 16px 0 0;
	font-size: 0.9375rem;
	font-weight: 600;
}
.card-links a { text-decoration: none; }
.card-links a:hover { text-decoration: underline; }

.empty-state {
	padding: 28px 12px;
	text-align: center;
	color: var(--muted);
}
.empty-state strong {
	display: block;
	margin-bottom: 4px;
	font-size: 1.25rem;
	color: var(--text);
}

.badge {
	display: inline-block;
	margin-right: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--gold-soft);
	color: var(--gold-text);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: 1px;
}

.select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a948e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px;
	cursor: pointer;
}

/* ---------- Resident area ---------- */
.layout-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }

/* The resident sidebar is taller than the screen, so it scrolls with the page. */
.layout-resident .sidebar { position: static; }

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin-bottom: 8px;
}
.section-head h2 { margin: 0; }

.seg {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-muted);
}
.seg a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 12px;
	border-radius: 999px;
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
}
.seg a:hover { background: var(--surface); color: var(--text); }

.notice-banner {
	margin-bottom: 20px;
	padding: 16px 20px;
	border: 1px dashed var(--gold);
	border-radius: var(--radius);
	background: var(--gold-soft);
}
.notice-banner p { margin: 0; font-weight: 600; }
.notice-banner .btn-row { margin-top: 12px; }

/* Announcements */
.post {
	padding: 18px 0;
	border-top: 1px solid var(--border);
	transition: opacity 0.3s;
}
.section-head + .post { border-top: 0; padding-top: 8px; }
.post-title { margin: 0 0 4px; font-size: 1.125rem; }
.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0 0 10px;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}
.post-meta strong { color: var(--text); letter-spacing: 0.02em; }
.post-body { font-size: 1rem; overflow-wrap: anywhere; }
.post-body img, .post-body video, .post-body iframe {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-sm);
}
.post-body > :last-child { margin-bottom: 0; }
.post .markasread { margin-top: 14px; }
.is-leaving { opacity: 0; }

/* Data tables: a normal table on wide screens, stacked label/value rows on phones. */
.table-wrap { margin-top: 12px; }

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	transition: opacity 0.3s;
}
.data-table th {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border-strong);
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}
.data-table td {
	padding: 12px;
	border-bottom: 1px solid var(--border);
	vertical-align: top;
}
.data-table tbody tr { transition: opacity 0.3s; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-muted); }
.data-table .empty-row td {
	padding: 24px 12px;
	text-align: center;
	color: var(--muted);
}
.data-table .empty-row:hover { background: none; }

@media (max-width: 699px) {
	.data-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
	.data-table,
	.data-table tbody,
	.data-table tr,
	.data-table td { display: block; width: 100%; }

	.data-table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
	.data-table tbody tr:last-child { border-bottom: 0; }
	.data-table tbody tr:hover { background: none; }

	.data-table td {
		display: flex;
		justify-content: space-between;
		gap: 16px;
		padding: 3px 0;
		border: 0;
		text-align: right;
	}
	.data-table td[data-label]::before {
		content: attr(data-label);
		flex: none;
		color: var(--muted);
		font-weight: 600;
		text-align: left;
	}
	.data-table td.cell-block { display: block; text-align: left; }
	.data-table td.cell-block::before { display: block; margin-bottom: 2px; }
	.data-table .empty-row td { display: block; text-align: center; }
}

/* Control panel */
.action-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
@media (min-width: 640px) {
	.action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.action {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-height: 96px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
	color: var(--text);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: border-color 0.15s, background-color 0.15s;
}
.action:hover {
	border-color: var(--accent);
	background: var(--accent-soft);
	color: var(--text);
}
.action svg { width: 24px; height: 24px; color: var(--accent); }

.faq h3 { margin: 20px 0 6px; font-size: 1rem; }
.faq h2 + h3 { margin-top: 0; }
.faq p { font-size: 0.9375rem; color: var(--muted); }

/* Sidebar widgets */
.calendar-panel { margin-top: 12px; min-height: 24px; }
.calerror { margin: 0; font-size: 0.9375rem; color: var(--muted); }

/* Month calendar (cal.php) */
.cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.cal-title { font-size: 0.9375rem; font-weight: 700; color: var(--text); }
a.cal-title { color: var(--accent); text-decoration: none; }
a.cal-title:hover { text-decoration: underline; }
.cal-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px;
	height: 36px;
	border: 1px solid var(--border);
	border-radius: 50%;
	color: var(--text);
}
.cal-nav:hover { background: var(--surface-muted); color: var(--accent); }
.cal-nav svg { width: 18px; height: 18px; }

.cal-grid {
	width: 100%;
	border-collapse: separate;
	border-spacing: 2px;
	table-layout: fixed;
	font-variant-numeric: tabular-nums;
}
.cal-grid th {
	padding: 4px 0;
	color: var(--muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
}
.cal-grid td { padding: 0; text-align: center; }
.cal-day {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 38px;
	aspect-ratio: 1;
	margin: 0 auto;
	border-radius: 50%;
	font-size: 0.875rem;
}
/* Day shading, weakest to strongest: weekend, holiday, board meeting. Today gets a ring
   so its own shading still shows. */
.is-weekend .cal-day, .cal-key-weekend { background: var(--weekend); color: var(--muted); }
.is-today .cal-day {
	box-shadow: inset 0 0 0 2px var(--accent);
	color: var(--accent);
	font-weight: 700;
}
.is-holiday .cal-day, .cal-key-holiday { background: var(--gold-soft); color: var(--gold-text); font-weight: 700; }
.is-meeting .cal-day, .cal-key-meeting { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.is-today.is-meeting .cal-day { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.is-other-month .cal-day { opacity: 0.4; }
.cal-grid td[title] { cursor: help; }

.cal-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	margin: 10px 0 0;
	color: var(--muted);
	font-size: 0.75rem;
}
.cal-key-item { display: inline-flex; align-items: center; gap: 5px; }
.cal-key {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}
.cal-key-weekend { box-shadow: inset 0 0 0 1px var(--border-strong); }

/* This month's holidays and meetings, under the grid. */
.cal-events {
	margin: 10px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid var(--border);
	list-style: none;
	font-size: 0.8125rem;
	line-height: 1.4;
}
.cal-event { display: flex; gap: 8px; padding: 3px 0; }
.cal-event-date { flex: none; width: 50px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-event.is-holiday span:last-child { color: var(--gold-text); }
.cal-event.is-meeting span:last-child { color: var(--accent); font-weight: 600; }
.cal-standalone { max-width: 360px; padding: 16px; }

/* Countdown to the next board meeting */
.countdown { margin: 4px 0 12px; }
.countdown-units {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}
.countdown-units:has(> .countdown-unit:only-child) { grid-template-columns: minmax(0, 1fr); }
.countdown-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 4px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
}
.countdown-num {
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.1;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}
.countdown-label {
	color: var(--muted);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.countdown-now {
	margin: 0;
	padding: 10px;
	border-radius: var(--radius-sm);
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 700;
	text-align: center;
}

/* Directory (directory.php and the Resident page panel) */
.seg a[aria-current] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.directory-search { display: flex; gap: 8px; margin-bottom: 12px; }
.directory-search .input { flex: 1; min-width: 0; }
.directory-controls { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 10px; }
.directory-filter { margin-bottom: 4px; }
.directory-none { margin: 12px 0 0; }
.contact-inline { display: inline-flex; align-items: center; gap: 6px; }
.contact-inline .icon-link { width: 32px; height: 32px; }
.contact-inline .icon-link:hover { background: var(--accent); color: var(--on-accent); }
.cell-email { overflow-wrap: anywhere; }
.directory-address { display: block; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.directory-compact td:last-child { white-space: nowrap; }
@media (min-width: 700px) {
	.directory-table td { vertical-align: middle; }
}
/* Phones: name with the address beneath it, then labelled mobile and email. */
@media (max-width: 699px) {
	.directory-table td[data-label="Name"]::before,
	.directory-table td[data-label="Address"]::before { content: none; }
	.directory-table td[data-label="Address"] {
		display: block;
		margin-top: -2px;
		padding-bottom: 6px;
		color: var(--muted);
		font-size: 0.9375rem;
		text-align: left;
	}
}

/* Profile (directory.php?id=...) */
.profile-card .page-title { font-size: clamp(1.6rem, 5vw, 2.1rem); }
.profile-address { display: flex; flex-direction: column; margin: 4px 0 16px; color: var(--muted); font-weight: 600; }
.detail-list { display: grid; gap: 0; margin: 0 0 16px; }
.detail-list > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2px;
	padding: 10px 0;
	border-top: 1px solid var(--border);
}
.detail-list > div:first-child { border-top: 0; padding-top: 0; }
.detail-list dt { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) {
	.detail-list > div { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; }
	.detail-list > div:first-child { padding-top: 0; }
}

/* Next board meeting (Resident page sidebar) */
.meeting-when { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.meeting-date {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 60px;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: var(--on-accent);
	line-height: 1;
}
.meeting-month { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.meeting-daynum { margin-top: 3px; font-size: 1.5rem; font-weight: 800; }
.meeting-title { margin: 0; font-weight: 700; line-height: 1.3; }
.meeting-time { margin: 2px 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }
.meeting-detail { margin: 0 0 10px; font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.next-meeting .btn { margin-top: 4px; }

.stat-card { text-align: center; }
.stat-num {
	margin: 0;
	font-size: 3.25rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--accent);
}
.stat-label { margin: 6px 0 0; color: var(--muted); }

.poll-question { margin: 0 0 12px; }
.poll-scope {
	margin: -6px 0 10px;
	color: var(--gold-text);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.poll-for { margin: 0 0 10px; font-size: 0.9375rem; color: var(--muted); }
.poll .field { margin-bottom: 10px; }

/* Radio group inside a form (who can vote) */
.choice-group { margin: 0 0 14px; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 2px; padding: 0; font-size: 0.875rem; font-weight: 600; }
.choice-group .checkbox {
	display: flex;
	margin-bottom: 0;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.4;
}
.choice-group input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.poll-option {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin-bottom: 8px;
	padding: 8px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 0.9375rem;
	cursor: pointer;
}
.poll-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.poll-option input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--accent);
}
.poll .btn-block { margin-top: 6px; }
.poll-result { margin-bottom: 12px; }
.poll-result-label {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 4px;
	font-size: 0.875rem;
}
.poll-result-label span:last-child { font-weight: 700; color: var(--accent); }
.poll-bar {
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--border);
}
.poll-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--accent);
}
.poll-count {
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
	text-align: center;
}

.card h2 a { color: inherit; text-decoration: none; }
.card h2 a:hover { color: var(--accent); }

.people { margin: 0; padding: 0; list-style: none; }
.person {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 14px 0;
	border-top: 1px solid var(--border);
	font-size: 0.9375rem;
	line-height: 1.45;
}
.person:first-child { padding-top: 0; border-top: 0; }
.person:last-child { padding-bottom: 0; }
.person img {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--surface-muted);
}
.person > div { min-width: 0; }
.person-title {
	display: block;
	color: var(--gold-text);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.person-name { display: block; font-weight: 600; }
.person-address { display: block; color: var(--muted); font-size: 0.875rem; }
.person-contact {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 2px;
}
.person-phone { margin-right: 4px; font-variant-numeric: tabular-nums; }
.person-contact .icon-link { width: 36px; height: 36px; }
.person-contact .icon-link:hover { background: var(--accent); color: var(--on-accent); }
.person-email { display: block; overflow-wrap: anywhere; }
.icon-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--accent-soft);
}
.icon-link svg { width: 16px; height: 16px; }

/* ---------- Board (admin.php) ---------- */
@media (min-width: 900px) {
	.layout-admin { grid-template-columns: minmax(0, 1fr) 240px; }
	.layout-admin .sidebar {
		max-height: calc(100vh - var(--header-h) - 48px);
		overflow-y: auto;
	}
}

.admin-nav-group + .admin-nav-group { margin-top: 18px; }
.admin-nav h2 {
	margin: 0 0 6px;
	color: var(--gold-text);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.admin-nav a {
	display: flex;
	align-items: center;
	min-height: 36px;
	margin: 0 -10px;
	padding: 0 10px;
	border-radius: 8px;
	color: var(--text);
	font-size: 0.9375rem;
	text-decoration: none;
}
.admin-nav a:hover { background: var(--surface-muted); color: var(--accent); }
.admin-nav a[aria-current="page"] {
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 700;
}

/* Phones and tablets: the board menu becomes a scrolling row of chips above the content. */
@media (max-width: 899px) {
	.admin-menu { order: -1; }
	.admin-nav {
		display: flex;
		gap: 8px;
		margin: 0 calc(-1 * var(--gutter));
		padding: 0 var(--gutter) 4px;
		overflow-x: auto;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
		scrollbar-width: none;
	}
	.admin-nav::-webkit-scrollbar { display: none; }
	.admin-nav-group { display: contents; }
	.admin-nav h2 { display: none; }
	.admin-nav a {
		flex: none;
		min-height: 40px;
		margin: 0;
		padding: 0 14px;
		border: 1px solid var(--border);
		border-radius: 999px;
		background: var(--surface);
		font-size: 0.875rem;
		font-weight: 600;
		white-space: nowrap;
	}
	.admin-nav a[aria-current="page"] {
		border-color: var(--accent);
		background: var(--accent);
		color: var(--on-accent);
	}
}

/* Site activity: a compact grid of figures that scrolls sideways on narrow screens. */
.table-scroll {
	margin: 12px calc(-1 * 20px) 0;
	padding: 0 20px;
	overflow-x: auto;
}
@media (min-width: 640px) {
	.table-scroll { margin-left: -28px; margin-right: -28px; padding: 0 28px; }
}
.stats-table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}
.stats-table th,
.stats-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	text-align: right;
	white-space: nowrap;
}
.stats-table thead th {
	border-bottom-color: var(--border-strong);
	color: var(--muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.stats-table tbody th {
	padding-left: 0;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
	text-align: left;
}
.stats-table thead th:first-child { padding-left: 0; }
.stats-table td { font-size: 1.0625rem; font-weight: 600; }
.stats-table tbody tr:last-child th,
.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table .stat-admin { color: var(--gold-text); }
.stats-table .stat-avg { color: var(--accent); }

.cell-sub {
	display: block;
	color: var(--muted);
	font-size: 0.8125rem;
	font-weight: 400;
}
.cell-ua {
	max-width: 280px;
	color: var(--muted);
	font-size: 0.8125rem;
	overflow-wrap: anywhere;
}
.table-foot {
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.data-table tr[data-href] { cursor: pointer; }
.row-link { font-weight: 700; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.cell-date { width: 32%; }
.pin { display: inline-block; margin-right: 6px; vertical-align: -1px; }
.expired { color: var(--danger); font-weight: 600; }

/* Long announcement bodies in the list: show the start, fade the rest. */
.clamp {
	max-height: 6.5em;
	margin-top: 4px;
	overflow: hidden;
	color: var(--muted);
	font-size: 0.875rem;
	line-height: 1.5;
	-webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
	mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.clamp * { font-size: inherit !important; font-family: inherit !important; color: inherit !important; }

/* Board forms */
.form .checkbox { margin-bottom: 14px; }
.form .btn-block { margin-top: 8px; }
.textarea { min-height: 18em; line-height: 1.5; resize: vertical; }
.textarea-short { min-height: 6em; }

/* Jodit editor (announcements): match the site's inputs. */
.form .jodit-container:not(.jodit_inline) {
	overflow: hidden;
	border-color: var(--border-strong);
	border-radius: var(--radius-sm);
}
.form .jodit-container:not(.jodit_inline):focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px var(--focus);
}
.form .jodit-wysiwyg { font-family: var(--font); font-size: 1rem; line-height: 1.6; }
.input-auto { width: auto; min-width: 200px; }
.option-list { margin: 0 0 10px; padding-left: 1.5em; }
.option-list li { margin-bottom: 8px; padding-left: 4px; }
.option-list li::marker { color: var(--muted); font-weight: 600; }

.btn-danger {
	border-color: var(--danger);
	background: transparent;
	color: var(--danger);
}
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }

.badge-live { background: var(--accent-soft); color: var(--accent); }

/* Accounts (Board) */
.status-cell {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 4px 8px;
}
@media (min-width: 700px) {
	.status-cell { justify-content: flex-start; }
}
.status-cell .cell-sub { display: inline; }
.status-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.status-pill::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}
.status-pill.is-on { background: var(--accent-soft); color: var(--accent); }
.status-pill.is-off { background: var(--danger-soft); color: var(--danger); }
a.status-pill:hover { box-shadow: inset 0 0 0 1px currentColor; }

.select-sm {
	width: auto;
	min-height: 36px;
	padding: 4px 36px 4px 10px;
	background-position: right 10px center;
	font-size: 0.875rem;
}
/* Keep 16px on phones so iOS Safari doesn't zoom in when the menu opens. */
@media (max-width: 699px) {
	.select-sm { font-size: 16px; }
}
.select:disabled { opacity: 0.6; cursor: not-allowed; }

/* Registrations (Board) */
.stat-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 4px 0 20px;
}
@media (min-width: 700px) {
	.stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.stat-tile {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-muted);
}
.stat-tile-num {
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.stat-tile-label { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.progress-row + .progress-row { margin-top: 12px; }
.bar-muted span { background: var(--border-strong); }
.bar-gold span { background: var(--gold); }
.code {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--surface-muted);
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.875rem;
	letter-spacing: 0.04em;
}

/* Two-column form fields on wider screens (officers) */
.form-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 16px;
}
@media (min-width: 640px) {
	.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.form-grid .input-auto { width: 120px; min-width: 0; }
.form-grid .field-wide { grid-column: 1 / -1; }
/* Two short fields side by side in one grid cell (state + ZIP, from + until). */
.field-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 12px;
}

/* Homeowners / Residences (Board) */
.back-link { margin: -8px 0 12px; font-size: 0.9375rem; font-weight: 600; }
.back-link a { text-decoration: none; }
.inline-form { display: inline; margin: 0; }
.cell-actions { white-space: nowrap; text-align: right; }
.cell-actions .btn + .inline-form,
.cell-actions .inline-form + .btn { margin-left: 6px; }
@media (max-width: 699px) {
	.data-table td.cell-actions { justify-content: flex-end; gap: 6px; padding-top: 8px; }
	.data-table td.cell-actions::before { content: none; }
	.cell-actions .btn + .inline-form { margin-left: 0; }
}
.badge-muted { background: var(--surface-muted); color: var(--muted); }
.field-help { margin: 0 0 14px; color: var(--muted); font-size: 0.875rem; }

/* Change password */
.form-card { max-width: 520px; }
.alert-success { background: var(--accent-soft); color: var(--accent); }

.poll-admin {
	padding: 16px 0;
	border-top: 1px solid var(--border);
}
.section-head + .poll-admin { padding-top: 8px; border-top: 0; }
.poll-admin:last-child { padding-bottom: 0; }
.poll-admin-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.poll-admin-head .badge { margin: 2px 0 0; }
.poll-admin-options {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}
.poll-admin-options li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-top: 1px dashed var(--border);
}
.poll-admin-options li span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--brand);
	color: var(--brand-ink-muted);
	font-size: 0.875rem;
	border-top: 1px solid var(--brand-line);
}

.footer-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-top: 28px;
	padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.footer-mark { width: 64px; flex: none; }

.footer-name {
	margin: 0;
	font-weight: 600;
	color: var(--brand-ink);
}
.footer-meta { margin: 2px 0 0; }
