/* Loma Rio Water Users Association – shared styles */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Core palette */
  --color-bg: #fafbfc;
  --color-surface: #f5f6f8;
  --color-border: #e2e4e8;
  --color-text: #1a1a2e;
  --color-text-muted: #5a6070;

  /* Accent */
  --color-accent: #2563a8;
  --color-accent-light: #e8f0fb;
  --color-accent-dark: #1a4f8a;
  --color-accent-focus: rgba(37, 99, 168, 0.12);

  /* Green / water-on */
  --color-green: #16a34a;
  --color-green-bg: #f0fdf4;
  --color-green-border: #bbf7d0;
  --color-green-dark: #166534;
  --color-status-on-border: #86efac;

  /* Amber / drought */
  --color-amber: #d97706;
  --color-amber-bg: #fffbeb;
  --color-amber-border: #fcd34d;
  --color-amber-border-left: #f59e0b;
  --color-amber-dark: #92400e;
  --color-amber-dot: #f59e0b;

  /* Status off (slate) */
  --color-status-off-bg: #f1f5f9;
  --color-status-off-border: #cbd5e1;
  --color-status-off-text: #475569;
  --color-status-off-dot: #94a3b8;
  --color-status-off-heading: #334155;

  /* Danger */
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;

  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: 'Source Serif 4', Georgia, serif;
  --max-width: 980px;
  font-size: 18px;
}

::selection {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 1rem;
}

/* ── Header & Nav ── */

header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: 0 1px 8px rgba(37, 99, 168, 0.07);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 170px;
  width: auto;
  display: block;
  transform: translateX(-3.4rem);
}

nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

nav a:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

nav a.active,
nav a.active:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
}

/* ── Main content ── */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Hero ── */

.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* ── Status Hero (main page) - horizontal banner ── */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--color-status-off-bg);
  border-radius: 12px;
  border: 1px solid var(--color-status-off-border);
  border-left-width: 5px;
  margin-bottom: 2.5rem;
}

.status-hero--on {
  background: var(--color-green-bg);
  border-color: var(--color-status-on-border);
  border-left-color: var(--color-green);
}

/* Drought modifier — overrides green with amber when water is on + drought */
.status-hero--on.status-hero--drought {
  background: var(--color-amber-bg);
  border-color: var(--color-amber-border);
  border-left-color: var(--color-amber-border-left);
}
.status-hero--off.status-hero--drought {
  border-left-color: var(--color-amber-border-left);
}
.status-hero--on.status-hero--drought .status-hero-pill {
  border-color: var(--color-amber-border);
  color: var(--color-amber-dark);
}
.status-hero--on.status-hero--drought .status-hero-pill-dot {
  background: var(--color-amber-dot);
  animation: none;
}
.status-hero--on.status-hero--drought .status-hero-label,
.status-hero--on.status-hero--drought .status-hero-note {
  color: var(--color-amber-dark);
}
.status-hero--on.status-hero--drought .status-hero-note {
  border-left-color: var(--color-amber-border);
}
.status-hero-drought-icon {
  display: none;
  color: var(--color-amber);
  flex-shrink: 0;
}
.status-hero--drought .status-hero-drought-icon {
  display: block;
}

.status-hero-pill {
  display: none;
}

.status-hero-pill:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  background: #fff;
  border: 1px solid var(--color-status-off-border);
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-status-off-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-hero--on .status-hero-pill {
  border-color: var(--color-status-on-border);
  color: var(--color-green-dark);
}

.status-hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-status-off-dot);
  flex-shrink: 0;
}

.status-hero--on .status-hero-pill-dot {
  background: var(--color-green);
  animation: pulse 2s infinite;
}

.status-hero-label {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--color-status-off-heading);
  white-space: nowrap;
  flex-shrink: 0;
}

.status-hero--on .status-hero-label {
  color: var(--color-green-dark);
}

.status-hero-note {
  font-size: 0.88rem;
  color: var(--color-status-off-text);
  line-height: 1.5;
  padding-left: 1.25rem;
  border-left: 1px solid var(--color-status-off-border);
  overflow-wrap: break-word;
  flex: 1;
  min-width: 0;
}

.status-hero--on .status-hero-note {
  color: var(--color-green-dark);
  border-left-color: var(--color-status-on-border);
}

/* ── Quick reference cards ── */

.info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.info-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  background: var(--color-bg);
}

.info-card-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.notice-card {
  margin-bottom: 2.5rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}
.notice-card p { margin: 0 0 0.75rem; }
.notice-card p:last-child { margin-bottom: 0; }
.notice-card ul { margin: 0 0 0.75rem 0; padding-left: 1.5rem; }
.notice-card li { margin-bottom: 0.35rem; }

.sched-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sched-row {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-size: 0.88rem;
}

.sched-who {
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.sched-who::after {
  content: " \2013\00a0";
  font-weight: 400;
  color: var(--color-text-muted);
}

.sched-when {
  color: var(--color-text-muted);
}

.sched-grid {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  max-width: var(--max-width);
}

.today-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.15rem;
  background: var(--color-accent-light);
  border: 1px solid #bfd4ed;
  border-radius: 10px;
}

.today-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--color-accent);
  color: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.today-icon-dow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.85;
}

.today-icon-num {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  margin-top: 0.15rem;
}

.today-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.today-line1 {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.35;
}

.today-line1 strong {
  color: var(--color-accent-dark);
  font-weight: 600;
}

.today-line2 {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}



/* ── Section headings ── */

.section-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ── Prose block ── */

.prose {
  background: var(--color-surface);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* ── Board cards ── */

.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.board-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--color-bg);
}

.board-card .role {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}

.board-card .name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}

.board-card a {
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: none;
  word-break: break-all;
}

.board-placeholder {
  font-size: 0.875rem;
  color: var(--color-border);
  font-style: italic;
}

.board-card a:hover {
  text-decoration: underline;
}

.board-phone {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

.board-phone a {
  font-size: 0.875rem;
}

.board-card-contact {
  margin-top: 0.5rem;
}

/* ── Documents list ── */

.docs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 580px;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, background 0.15s;
}

.doc-link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.doc-icon {
  font-size: 1.3rem;
  color: var(--color-accent);
  flex-shrink: 0;
  line-height: 1;
}

.doc-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.doc-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.doc-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ── Mobile logo banner ── */

.mobile-logo-banner {
  display: none;
}

.board-note {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem 0.9rem 1rem;
  overflow-wrap: break-word;
}

/* ── Leaks page ── */

.board-note--urgent {
  background: var(--color-danger-bg);
  border-left-color: var(--color-danger);
  color: var(--color-text);
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.board-note--urgent a {
  color: var(--color-danger);
  text-decoration: underline;
  font-weight: 700;
}

.leak-steps {
  list-style: decimal;
  padding-left: 1.4rem;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.leak-steps li {
  margin-bottom: 0.85rem;
}

.leak-steps strong {
  display: inline-block;
  margin-bottom: 0.15rem;
}

.leak-diagram-details {
  margin: 0 0 1.5rem;
}

.leak-diagram-details summary {
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--color-accent);
  padding: 0.4rem 0;
}

.leak-diagram-details[open] summary {
  margin-bottom: 0.75rem;
}

.leak-diagram {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin: 0 auto 0.5rem;
}

.leak-contact-link {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.leak-contact-link a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.leak-contact-link a:hover {
  text-decoration: underline;
}

/* ── Subscribe trigger + modal ── */

.subscribe-trigger {
  margin-top: 1.5rem;
  display: flex;
}

.subscribe-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.sub-modal-backdrop {
  display: none;
}

.sub-modal-backdrop:not([hidden]) {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: sub-modal-fade 0.15s ease;
}

@keyframes sub-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sub-modal-dialog {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  animation: sub-modal-slide 0.15s ease;
}

@keyframes sub-modal-slide {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.sub-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.sub-modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.sub-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}

.sub-modal-close:hover { color: var(--color-text); background: var(--color-bg); }
.sub-modal-close:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.subscribe-blurb {
  margin: 0 0 1.1rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.subscribe-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.subscribe-row input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
}

.subscribe-row input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.subscribe-lists {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

.subscribe-lists label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.subscribe-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.subscribe-msg {
  font-size: 0.9rem;
}

.subscribe-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.subscribe-msg.ok { color: var(--color-green-dark); }
.subscribe-msg.err { color: var(--color-danger); }
.subscribe-check {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.subscribe-check circle {
  fill: var(--color-green-dark);
}
.subscribe-check path {
  stroke: #fff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  animation: subscribe-check-draw 0.45s 0.05s ease-out forwards;
}
@keyframes subscribe-check-draw {
  to { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .subscribe-check path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

@media (max-width: 560px) {
  .subscribe-row { grid-template-columns: 1fr; }
}

/* ── Contact form ── */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 580px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row--split > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}

.required {
  color: var(--color-danger);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-focus);
}

.contact-form textarea {
  resize: vertical;
  min-height: 110px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: -0.5rem;
}

.form-submit {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-accent);
  border: none;
  border-radius: 7px;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s, opacity 0.15s;
}

.form-submit:hover {
  background: var(--color-accent-dark);
}

.form-submit:active {
  transform: translateY(1px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-success {
  max-width: 580px;
  background: var(--color-green-bg);
  border: 1px solid var(--color-green-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--color-green-dark);
}

.form-error-inline {
  display: none;
  font-size: 0.88rem;
  color: var(--color-danger);
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
}

/* ── FAQ page ── */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 680px;
}

h3.faq-question {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.faq-answer {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.faq-answer p + p {
  margin-top: 0.6rem;
}

.faq-answer a {
  color: var(--color-accent);
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

.faq-map {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-top: 0.75rem;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-admin-link {
  color: inherit;
  text-decoration: none;
}
.footer-admin-link:hover { text-decoration: underline; }

/* ── Screen-reader only ── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Skip link (keyboard a11y) ── */

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  background: var(--color-accent);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transform: translateY(-150%);
  transition: transform 0.15s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ── Focus styles (high-contrast, 3px outline for older / low-vision users) ── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Responsive ── */

@media (max-width: 560px) {
  :root { font-size: 16px; }

  .mobile-logo-banner {
    display: block;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 0.6rem 1.25rem;
  }

  .mobile-logo-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }

  .site-logo {
    display: none;
  }

  .header-inner {
    height: auto;
    padding: 0;
    gap: 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-border);
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 0.25rem 0.5rem;
    gap: 0.1rem;
    margin-left: 0;
  }

  nav a {
    font-size: 0.95rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
  }

  nav a:hover {
    background: transparent;
    color: var(--color-text);
  }

  nav a.active,
  nav a.active:hover {
    background: transparent;
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

  .sched-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .form-row--split {
    grid-template-columns: 1fr;
  }

  .form-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }

  .status-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1.4rem;
  }
  .status-hero-label { font-size: 1.65rem; white-space: normal; }
  .status-hero-note {
    padding-left: 0;
    border-left: none;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-status-off-border);
    width: 100%;
  }
  .status-hero--on .status-hero-note {
    border-top-color: var(--color-status-on-border);
  }

  /* Board accordion - only on cards that have contact info */
  .board-card:has(.board-card-contact) .board-card-header {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-right: 1.75rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  .board-card:has(.board-card-contact) .board-card-header::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 700;
    line-height: 1.3;
  }

  .board-card.open:has(.board-card-contact) .board-card-header::after {
    content: "−";
  }

  .board-card-contact {
    display: none;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
  }

  .board-card.open .board-card-contact {
    display: block;
  }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .status-hero-pill-dot {
    animation: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Admin console ── */

.auth-strip {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.auth-strip--ok {
  background: var(--color-accent-light);
  border-color: #bfd4ed;
  color: var(--color-accent-dark);
}

.auth-strip--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.auth-strip--loading {
  font-style: italic;
}

.auth-strip-logout {
  margin-left: 0.75rem;
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
}
.auth-strip-logout:hover { text-decoration: none; }

.admin-loading {
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 1rem;
  font-style: italic;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.admin-tab {
  background: none;
  border: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  border-radius: 6px 6px 0 0;
}

.admin-tab:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.admin-tab--active,
.admin-tab--active:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  background: transparent;
}

.admin-panel {
  animation: admin-fade-in 0.15s ease-out;
}

@keyframes admin-fade-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

.admin-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--color-bg);
  margin-bottom: 1rem;
}

.admin-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.field:last-child { margin-bottom: 0; }

.field--grow { flex: 1; min-width: 0; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}

.field .hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="file"],
.field textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-focus);
}

.field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* Toggle (water on/off) */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-status-off-border);
  border-radius: 28px;
  cursor: pointer;
  transition: 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: var(--color-bg);
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider { background: var(--color-green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

.toggle-label {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-bg);
  background: var(--color-accent);
  border: none;
  border-radius: 7px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary:hover { background: var(--color-accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-secondary {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid #bfd4ed;
  border-radius: 7px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover { background: #d6e5f5; }

.btn-icon {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-icon:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-icon:disabled:hover {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn-icon--danger:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

/* Save row & messages */
.save-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.save-msg {
  font-size: 0.88rem;
  min-height: 1.2em;
}

.save-msg.ok { color: var(--color-green-dark); font-weight: 600; }
.save-msg.err { color: var(--color-danger); font-weight: 600; }

.row-actions {
  margin: 0.5rem 0 1.25rem;
}

.empty-hint {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.9rem;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Board edit rows */
.row-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.board-row-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  min-width: 0;
}

.row-controls {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Documents edit list */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 160px;
  gap: 0.75rem 1rem;
}

.docs-edit-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.doc-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0;
}

.doc-row-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.doc-row-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

.doc-row-title {
  font-weight: 600;
  font-size: 0.95rem;
  overflow-wrap: break-word;
}

.doc-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.doc-row-link {
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.doc-row-link:hover { text-decoration: underline; }

.doc-row-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.doc-row-badge--public  { background: #dff3e2; color: #1f6b34; }
.doc-row-badge--private { background: #f3dede; color: #8a2222; }

/* Public docs/meetings page: 2-column on desktop, stacked on mobile */
.docs-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 2.5rem;
  align-items: start;
}
.docs-page-main { min-width: 0; }
.docs-page-side {
  position: sticky;
  top: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  border-left: 1px solid var(--color-border, #e5e0d6);
  padding-left: 1.5rem;
}
.docs-page-side h2 { margin-top: 0; }
@media (max-width: 760px) {
  .docs-page-grid { grid-template-columns: 1fr; gap: 2rem; }
  /* Evergreen docs (bylaws, etc.) above the meeting timeline on mobile */
  .docs-page-side  { order: 1; }
  .docs-page-main  { order: 2; }
  .docs-page-side {
    position: static;
    max-height: none;
    overflow-y: visible;
    border-left: none;
    border-bottom: 1px solid var(--color-border, #e5e0d6);
    padding-left: 0;
    padding-bottom: 1.5rem;
  }
}

.attachments-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted, #6b6b6b);
  margin: 1rem 0 0.4rem;
}

/* ── Meeting tiles (public docs page) ── */

.meetings-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mtile {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color 0.15s;
}

.mtile--open {
  border-color: var(--color-accent);
}

.mtile-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.12s;
}

.mtile-head:hover { background: var(--color-accent-light); }
.mtile-head:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; border-radius: 10px; }

.mtile-date-block {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  white-space: nowrap;
  min-width: 7rem;
  flex-shrink: 0;
}

.mtile-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  min-width: 0;
}

.mtile-title {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.mtile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid #bfd4ed;
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.mtile-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
}

.mtile--open .mtile-chevron { transform: rotate(180deg); }

.mtile-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--color-border);
}

.mtile-bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.925rem;
  line-height: 1.6;
}

.mtile-bullets li { margin-bottom: 0.2rem; }

.mtile-notes {
  margin: 0.75rem 0 0;
  font-size: 0.925rem;
  line-height: 1.65;
}

.mtile-notes p { margin: 0 0 0.4rem; }
.mtile-notes ul, .mtile-notes ol { padding-left: 1.25rem; margin: 0 0 0.4rem; }
.mtile-notes li { margin-bottom: 0.15rem; }
.mtile-notes h3 { font-size: 1rem; margin: 0.6rem 0 0.2rem; }
.mtile-notes strong { font-weight: 600; }
.mtile-notes em { font-style: italic; }

.meetings-tiles-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meetings-pager {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
}

.meetings-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.meetings-pager-btn:hover:not(:disabled) {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.meetings-pager-btn--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.meetings-pager-btn--active:hover { background: var(--color-accent-dark); }

.meetings-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.meetings-pager-arrow { color: var(--color-text-muted); }

/* Meetings admin */
.meetings-edit-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.meeting-card { margin-bottom: 0; }

.add-meeting-area {
  margin-top: 1rem;
}

.add-meeting-form {
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}

.add-meeting-form-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  align-items: end;
}

@media (max-width: 560px) {
  .add-meeting-form-fields { grid-template-columns: 1fr; }
}

.meeting-card-save {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.meeting-docs-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.45rem 0.65rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  width: 100%;
  text-align: left;
}

.meeting-docs-toggle:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.meeting-docs-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.meeting-docs-toggle.open .meeting-docs-chevron { transform: rotate(180deg); }

.meeting-docs-body {
  margin-top: 0.5rem;
}

.meeting-quill-editor {
  border: 1px solid var(--color-border);
  border-radius: 0 0 6px 6px;
  background: var(--color-bg);
  min-height: 120px;
}

.meeting-quill-editor .ql-editor {
  min-height: 120px;
  font-family: var(--font);
  font-size: 0.925rem;
  line-height: 1.6;
}

/* Keep Quill toolbar style consistent with admin card chrome */
.meeting-quill-editor .ql-toolbar.ql-snow {
  border-color: var(--color-border);
  border-radius: 6px 6px 0 0;
  background: var(--color-surface);
}

.meeting-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.9rem;
}

.meeting-head .field { margin-bottom: 0; }

@media (max-width: 640px) {
  .board-row-fields { grid-template-columns: 1fr; }
  .row-card { flex-direction: column; }
  .upload-grid { grid-template-columns: 1fr; }
  .meeting-head { flex-direction: column; align-items: stretch; }
  .meeting-head .field { width: 100%; }

  /* Larger tap targets on row controls (WCAG 2.5.5: 44x44 minimum) */
  .row-controls {
    flex-direction: row;
    width: 100%;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .btn-icon {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }
  .btn-secondary,
  .btn-primary {
    min-height: 44px;
    padding: 0.6rem 1rem;
  }

  /* Meeting head: title/date/delete each get a row instead of an awkward grid */
  .meeting-head .btn-icon {
    align-self: flex-end;
  }

  /* Doc-row delete/visibility buttons wrap onto their own line */
  .doc-row { flex-direction: column; align-items: stretch; }
  .doc-row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }
  .doc-row-actions .btn-secondary { flex: 1 1 auto; }

  /* Tabs scroll horizontally on small screens instead of clipping */
  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .admin-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Sticky save bar at the bottom of each panel - keeps Save reachable when
     editing a long board roster or meeting list without scrolling back up. */
  .admin-panel .save-row {
    position: sticky;
    bottom: 0;
    background: var(--color-bg, #f4f1ea);
    padding: 0.75rem 0;
    border-top: 1px solid var(--color-border, #e5e0d6);
    margin-top: 1rem;
    z-index: 5;
  }
}

