:root {
  /* Dynamic Palette (Strictly No Blue) */
  --bg-canvas: #f3f0fa; /* Pale lilac base */
  --bg-surface: #ffffff; /* White surface */
  --text-primary: #334155; /* Slate text */
  --text-muted: #475569; /* Lighter slate metadata */
  --accent-primary: #55265c; /* Plum accent */
  --accent-hover: #3e1b43; /* Darker plum for interaction */
  
  /* Advanced UI & Depth */
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --glass-backdrop: blur(12px) saturate(140%);
  --hard-shadow: 4px 4px 0 var(--text-primary);
  --hard-shadow-closed: 0 0 0 var(--text-primary);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important; /* Strict 0px radius */
}

body {
  font-family: Charter, Cambria, Georgia, serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--accent-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-style: dashed;
}

.jurisdiction-label, .source-label {
  font-variant: small-caps;
  font-size: 0.85em;
  letter-spacing: 1px;
  font-weight: bold;
  color: var(--accent-primary);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.source-summary-strip {
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  padding: 0.75rem 1rem;
  margin-bottom: 2rem;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Header & Nav */
.header-tagline {
  background-color: var(--accent-primary);
  color: var(--bg-surface);
  text-align: center;
  font-size: 0.8rem;
  padding: 0.5rem;
  letter-spacing: 1px;
  font-variant: small-caps;
}

.site-header {
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--text-primary);
  position: static;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  display: block;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5%;
}

.reading-width {
  max-width: 72ch;
  margin: 0 auto;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  background: linear-gradient(to bottom, rgba(85, 38, 92, 0.8), rgba(85, 38, 92, 0.95)), url('images/hero-moody-road.jpg') center/cover no-repeat;
  color: var(--bg-surface);
}

.hero h1 {
  color: var(--bg-surface);
  max-width: 800px;
  margin-bottom: 1.5rem;
}

/* Reference Panels & Cards */
.plum-field {
  background-color: var(--accent-primary);
  padding: 4rem 5%;
  color: var(--bg-surface);
}

.plum-field h2, .plum-field h3, .plum-field p {
  color: var(--bg-surface);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.reference-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  padding: 2rem;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  box-shadow: var(--hard-shadow);
  transition: transform 0.3s var(--ease-kinetic);
}

.reference-panel:hover {
  transform: translateY(-4px);
}

.reference-panel h3 {
  color: var(--accent-primary);
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--accent-primary);
  color: var(--bg-surface);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--text-primary);
  box-shadow: var(--hard-shadow);
  transition: all 0.2s var(--ease-kinetic);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover {
  transform: translate(4px, 4px);
  box-shadow: var(--hard-shadow-closed);
  color: var(--bg-surface);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 2px solid var(--text-primary);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--text-muted);
}

th {
  background-color: var(--bg-canvas);
  font-weight: 700;
  color: var(--accent-primary);
}

/* Accordions / Tabs */
.accordion {
  border: 2px solid var(--text-primary);
  margin-bottom: 1rem;
  background: var(--bg-surface);
}

.accordion-header {
  width: 100%;
  text-align: left;
  padding: 1rem;
  background: var(--bg-surface);
  border: none;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--accent-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.accordion-header::after {
  content: '+';
  font-size: 1.5rem;
}

.accordion-header.active::after {
  content: '−';
}

.accordion-content {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-kinetic);
  background: var(--bg-canvas);
}

/* Contact Tool Layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-variant: small-caps;
}

.input-group input, .input-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--text-primary);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
}

.review-pane-container {
  background: var(--bg-canvas);
  border: 2px solid var(--text-primary);
  padding: 1.5rem;
}

pre#review-pane {
  background: var(--bg-surface);
  padding: 1rem;
  border: 1px solid var(--text-muted);
  white-space: pre-wrap;
  min-height: 200px;
  font-family: inherit;
  margin-bottom: 1rem;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border: 2px solid var(--text-primary);
}

.hero-image {
  aspect-ratio: 16/9;
  width: 100%;
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  background-color: var(--text-primary);
  color: var(--bg-canvas);
  padding: 4rem 5% 2rem;
  margin-top: 4rem;
}

.site-footer h3 {
  color: var(--bg-canvas);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--text-muted);
  padding-bottom: 2rem;
}

.footer-links a {
  color: var(--bg-canvas);
  display: block;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-decoration-style: dashed;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  font-size: 0.9em;
  color: #94a3b8;
}

.footer-bottom a {
  color: #94a3b8;
  margin: 0 0.5rem;
}

/* Scroll Reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 1rem 0;
    gap: 1rem;
  }
  
  .main-nav.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }

  .site-header {
    flex-direction: row;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

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