/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Branding-aware defaults. --brand-primary is injected from SystemConfiguration
   (layout) and its default (#1f5130 on white) meets WCAG AA contrast. */
:root {
  --brand-primary: #1f5130;
  --text: #1a1a1a;
  --bg: #ffffff;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

main { padding: 1rem; }

a { color: var(--brand-primary); }

.site-header {
  background: var(--brand-primary);
  color: #ffffff;
  padding: 0.75rem 1rem;
}
.site-header a, .site-header .brand-name { color: #ffffff; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.25rem; }

/* Visually-hidden skip link that becomes visible on keyboard focus
   (WCAG 2.4.1 Bypass Blocks). */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  color: var(--brand-primary);
  padding: 0.5rem 1rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 0;
}

.flash { padding: 0.5rem 1rem; border-radius: 4px; }
.flash-notice { background: #e6f4ea; color: #14532d; }
.flash-alert { background: #fde8e8; color: #7f1d1d; }

.site-footer { padding: 1rem; color: #4a4a4a; }

/* Screen-reader-only content (e.g. table captions) — present in the
   accessibility tree but visually hidden (WCAG 1.3.1). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* A button rendered from button_to/link styled inline like a link control. */
.link-button {
  background: none;
  border: none;
  color: var(--brand-primary);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
