:root {
  --color-base: #fbf1f0;
  --color-surface: #fffafa;
  --color-text: #1c1917;
  --color-text-muted: #4a4543;
  --color-accent: #6b2155;
  --color-accent-hover: #521841;
  --color-accent-light: #f3e3ed;
  --color-border: #e3d2db;
  --font-serif: Charter, Cambria, Georgia, serif;
  --radius: 20px;
  --radius-sm: 6px;
  --shadow-block: 4px 4px 0 #1c1917;
  --shadow-none: 0 0 0 transparent;
  --max-width: 1120px;
  --max-reading: 720px;
}

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

html {
  font-family: var(--font-serif);
  font-size: 100%;
  line-height: 1.6;
  background-color: var(--color-base);
  color: var(--color-text);
  overflow-wrap: anywhere;
  hyphens: auto;
}

body {
  margin: 0;
  padding: 12px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-base);
  border: 1px solid var(--color-accent);
}

@media (min-width: 768px) {
  body {
    padding: 24px;
    border-width: 2px;
  }
}

.skip-link {
  position: absolute;
  top: -999px;
  left: 20px;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 14px;
  z-index: 9999;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 14px;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Header & Navigation - Slim, Proper, Scrolls Naturally With Page */
.site-header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 24px auto;
  position: relative;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  min-height: 48px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(28, 25, 23, 0.04);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1;
}

.site-brand svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--color-accent);
}

/* 3-Dot Dropdown Toggle for Mobile */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

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

.menu-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (min-width: 960px) {
  .menu-toggle {
    display: none;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

@media (max-width: 959px) {
  .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(28, 25, 23, 0.12);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
  }

  .site-nav[hidden] {
    display: none;
  }
}

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

@media (max-width: 959px) {
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 10px;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  display: inline-block;
  line-height: 1.3;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-accent);
  background-color: var(--color-accent-light);
}

/* Slim Compact CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-text);
  box-shadow: 2px 2px 0 #1c1917;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 32px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}

.cta-button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #1c1917;
  background-color: var(--color-accent-hover);
}

@media (prefers-reduced-motion: reduce) {
  .cta-button {
    transition: none;
  }
  .cta-button:hover {
    transform: none;
    box-shadow: 2px 2px 0 #1c1917;
  }
}

/* Main Content & Containers */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.reading-column {
  max-width: var(--max-reading);
  margin: 0 auto;
}

.hero-panel {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .hero-panel {
    padding: 56px 48px;
  }
}

.hero-image-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #f0e2ec;
  border: 1px solid var(--color-border);
}

.hero-image-wrap img,
.card-media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hero-content {
  text-align: center;
  max-width: var(--max-reading);
  margin: 0 auto;
}

h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  color: var(--color-accent);
  margin-top: 0;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  h1 {
    font-size: 2.8rem;
  }
}

h2 {
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--color-accent);
  margin-top: 36px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  margin-top: 24px;
  margin-bottom: 12px;
}

p {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

p strong {
  color: var(--color-text);
}

.breadcrumbs {
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-accent);
  text-decoration: underline;
}

.badge-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

/* Grid & Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin: 32px 0;
}

@media (min-width: 680px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-media {
  position: relative;
  background-color: #eedde8;
  border-bottom: 1px solid var(--color-border);
}

.card-badge {
  position: absolute;
  bottom: -12px;
  left: 20px;
  background: var(--color-accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-body {
  padding: 24px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.35rem;
  margin: 8px 0 12px 0;
  color: var(--color-accent);
}

.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: underline;
  padding-top: 12px;
}

/* Ordered steps and procedures */
.step-list {
  list-style: none;
  counter-reset: custom-step;
  padding: 0;
  margin: 28px 0;
}

.step-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 24px;
}

.step-item::before {
  counter-increment: custom-step;
  content: counter(custom-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Callout box */
.info-box {
  background-color: var(--color-surface);
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

/* Table styles */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

caption {
  padding: 14px 20px;
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
}

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

th {
  background-color: #f7eaf2;
  color: var(--color-accent);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

/* Details and Accordion */
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  padding: 14px 18px;
}

summary {
  font-weight: 700;
  color: var(--color-accent);
  cursor: pointer;
  min-height: 32px;
  display: list-item;
  font-size: 1.05rem;
}

details[open] {
  border-color: var(--color-accent);
}

details[open] summary {
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 8px;
}

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

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

label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
  font-size: 0.95rem;
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
}

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

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
  font-family: inherit;
  font-size: 0.85rem;
}

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

.output-box {
  margin-top: 24px;
  padding: 16px;
  background-color: #f7eef4;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.output-box textarea {
  background-color: #fff;
}

.status-message {
  margin-top: 12px;
  font-weight: 700;
  color: var(--color-accent);
  min-height: 24px;
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding-top: 36px;
  border-top: 2px solid var(--color-accent);
  background-color: var(--color-surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 24px;
}

@media (min-width: 768px) {
  .site-footer {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.footer-column h4 {
  font-size: 1rem;
  font-variant: all-small-caps;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-top: 0;
  margin-bottom: 12px;
}

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

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

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.footer-meta {
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-legal-address {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.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;
}