:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #2b211a;
  --text-muted: #57463a;
  --primary: #c2562e;
  --primary-hover: #a3431f;
  --secondary: #6b7a3a;
  --secondary-light: #eef2e1;
  --border: #d8cebe;
  --line: #e8e0d5;
  --focus-ring: #2b211a;
}

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

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--text);
  color: #ffffff;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Header & Tagline */
.tagline-bar {
  background-color: var(--secondary);
  color: #ffffff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 16px;
  text-align: center;
  font-weight: 600;
  line-height: 1.4;
}

.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.brand-text {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 16px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  border: none;
  cursor: pointer;
  line-height: 1.2;
  min-height: 34px;
}
.btn-pill:hover {
  background-color: var(--primary-hover);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--text);
  min-height: 34px;
  min-width: 34px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.menu-toggle:hover {
  background-color: var(--bg);
}

.menu-dots-icon {
  display: block;
  width: 18px;
  height: 18px;
}

/* Main Layout */
main {
  flex: 1 0 auto;
}

.content-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 20px;
}

.reading-column {
  max-width: 760px;
  margin: 0 auto;
}

.editorial-extract {
  border-left: 4px solid var(--primary);
  background-color: var(--surface);
  padding: 20px 24px;
  margin: 28px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-muted);
}

.breakout-media {
  margin: 32px 0;
  width: 100%;
}

.breakout-media img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: system-ui, "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1 {
  font-size: 2.25rem;
  margin-top: 0.4em;
}

h2 {
  font-size: 1.625rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.2em;
  font-size: 1rem;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Radial Gradients Background */
.gradient-bg {
  background:
    radial-gradient(circle at 10% 20%, rgba(194, 86, 46, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(107, 122, 58, 0.12) 0%, transparent 40%),
    var(--bg);
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 60px;
}

.hero-text {
  min-width: 0;
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

/* Breadcrumbs */
.breadcrumb-nav {
  font-size: 0.875rem;
  margin-bottom: 20px;
  color: var(--text-muted);
}
.breadcrumb-nav a {
  color: var(--primary);
  text-decoration: none;
}
.breadcrumb-nav a:hover {
  text-decoration: underline;
}

/* Flat Panels & Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.flat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.flat-card h3 {
  margin-top: 0;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.card-link:hover {
  text-decoration: underline;
}

/* Lists and Steps */
.step-list {
  padding-left: 24px;
  margin: 24px 0;
}

.step-list li {
  margin-bottom: 16px;
  padding-left: 8px;
}

.definition-group {
  margin: 28px 0;
}
.definition-group dt {
  font-weight: 800;
  font-size: 1.0625rem;
  margin-top: 16px;
  color: var(--secondary);
}
.definition-group dd {
  margin-left: 0;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
  min-width: 580px;
}

caption {
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  background-color: var(--secondary-light);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background-color: #f4ede2;
  font-weight: 700;
}

/* Native FAQ Details */
details.faq-item {
  border: 1px solid var(--border);
  background-color: var(--surface);
  margin-bottom: 16px;
  padding: 0;
}

details.faq-item summary {
  padding: 16px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fbf9f5;
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-left: 12px;
}

details[open].faq-item summary::after {
  content: "–";
}

details.faq-item .faq-answer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* Forms */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  margin: 28px 0;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background-color: #ffffff;
  color: var(--text);
  box-sizing: border-box;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn-secondary {
  background-color: #e5ddcf;
  color: var(--text);
  border: none;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
  border-radius: 4px;
}
.btn-secondary:hover {
  background-color: #d6cbba;
}

.status-box {
  margin-top: 16px;
  padding: 10px 14px;
  background-color: var(--secondary-light);
  border: 1px solid var(--secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Related Links Block */
.related-block {
  border-top: 2px solid var(--border);
  margin-top: 48px;
  padding-top: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.related-box {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 20px;
}

/* Footer */
.site-footer {
  background-color: #241b15;
  color: #dfd8cf;
  border-top: 4px solid var(--secondary);
  padding: 48px 20px 32px;
  font-size: 0.9375rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #44372e;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 12px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: #e6dfd6;
  text-decoration: none;
}
.footer-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 24px;
  font-size: 0.875rem;
  color: #b5a99d;
  line-height: 1.6;
}

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

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 8px 16px;
  }
  .brand-text {
    font-size: 0.95rem;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 4px);
    right: 12px;
    left: auto;
    min-width: 240px;
    max-width: calc(100vw - 24px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 12px 14px;
    align-items: stretch;
    z-index: 1000;
  }
  .main-nav[hidden] {
    display: none;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
  }
  .nav-link {
    width: 100%;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
  }
  .nav-link:hover, .nav-link[aria-current="page"] {
    background-color: var(--secondary-light);
    border-bottom-color: transparent;
  }
  .main-nav .btn-pill {
    width: 100%;
    margin-top: 10px;
    font-size: 0.8125rem;
    padding: 6px 12px;
    text-align: center;
  }
}

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