:root {
  --bg: #f3efe4;
  --paper: #fffdf8;
  --paper-strong: #fffefb;
  --ink: #131919;
  --muted: #43524e;
  --accent: #0a6650;
  --accent-2: #c27722;
  --line: #d5cfbf;
  --surface: #ece6d6;
  --shadow: rgba(16, 24, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background-image: url('hospital-vignet.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #d8d0c0;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
}

.site-wrap {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

header {
  border-bottom: 1px solid var(--line);
  background: #f7f1e5;
  box-shadow: 0 10px 24px rgba(16, 24, 20, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  font-family: "Oswald", Impact, sans-serif;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  font-size: 0.96rem;
  color: var(--muted);
  padding-bottom: 0.12rem;
  border-bottom: 2px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent);
  border-bottom-color: rgba(10, 102, 80, 0.6);
}

nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

main.site-wrap,
.document-shell,
.article-shell {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(16, 24, 20, 0.14);
}

main.site-wrap {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  padding: 0 clamp(1rem, 3vw, 2.2rem) 2.4rem;
}

.document-shell,
.article-shell {
  width: min(980px, 92vw);
  margin: 1.5rem auto 2rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.document-shell h1,
.article-shell h1 {
  color: var(--accent);
}

.document-title {
  margin-top: 0;
  margin-bottom: 0.5rem;
  max-width: none;
}

.document-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.document-section {
  margin-bottom: 2rem;
}

.document-heading {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.document-shell h2,
.article-shell h2 {
  color: var(--accent);
}

.document-list {
  margin-left: 2rem;
  line-height: 1.8;
}

.document-note {
  margin-top: 1rem;
}

.document-contact {
  margin-top: 0.5rem;
  font-weight: 600;
}

.document-address {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.document-response {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.document-callout {
  margin-bottom: 3rem;
  background: #f5ede0;
  padding: 1.5rem;
  border-left: 6px solid var(--accent);
  border-radius: 12px;
}

.document-callout h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.document-callout p {
  margin: 0;
}

.article-card h3 {
  margin-bottom: 0.6rem;
}

.article-card .cta-row {
  margin-top: 1rem;
}

.site-footer-panel {
  width: min(1080px, 92vw);
  margin: 0 auto 2.5rem;
  padding: 1.4rem 1.8rem;
  border-radius: 20px;
  border: 1px solid #d3ccb9;
  background: #f7f1e5;
  box-shadow: 0 14px 34px rgba(16, 24, 20, 0.12);
}

.site-footer-panel p {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.site-footer-panel p + p {
  margin-top: 0.7rem;
}

.site-footer-panel a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.site-footer-counter-shell {
  width: min(860px, 92vw);
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(247, 241, 229, 0.96) 0%, rgba(255, 253, 248, 0.98) 100%);
}

.dr-duck-footer {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
  border: 1px solid #d7cfbd;
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 1.4rem);
  background:
    radial-gradient(circle at 18% 16%, rgba(194, 119, 34, 0.1), transparent 38%),
    linear-gradient(140deg, rgba(255, 254, 251, 0.98) 0%, rgba(246, 240, 227, 0.95) 100%);
}

.dr-duck-stage {
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}

.dr-duck-static {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(16, 24, 20, 0.14));
}

.dr-duck-fallback {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(245, 240, 230, 0.96);
  border: 1px solid rgba(10, 102, 80, 0.16);
  color: var(--muted);
  font-size: 0.84rem;
}

.dr-duck-fallback[hidden] {
  display: none;
}

.dr-duck-fallback-emoji {
  font-family: "Oswald", Impact, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dr-duck-fallback-copy,
.dr-duck-mood {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.dr-duck-counter-panel {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  text-align: center;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(10, 102, 80, 0.12);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 14px 32px rgba(16, 24, 20, 0.08);
}

.dr-duck-counter-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.dr-duck-counter-metric {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(10, 102, 80, 0.12);
  border-radius: 14px;
  padding: 0.75rem 0.7rem;
  background: rgba(255, 255, 255, 0.66);
}

.dr-duck-counter-kicker {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dr-duck-counter-value {
  margin: 0;
  font-family: "Oswald", Impact, sans-serif;
  font-size: clamp(2.3rem, 6vw, 3.5rem);
  line-height: 0.92;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-shadow: 0 6px 16px rgba(10, 102, 80, 0.18);
  font-variant-numeric: tabular-nums;
}

.dr-duck-counter-value-secondary {
  color: var(--accent-2);
  text-shadow: 0 6px 16px rgba(194, 119, 34, 0.2);
}

.dr-duck-counter-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #23312d;
}

.dr-duck-counter-lastpageview {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: #475952;
  letter-spacing: 0.01em;
}

.dr-duck-counter-status {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero {
  padding: 4rem 0 2.2rem;
  animation: rise-in 460ms ease-out both;
}

.kicker {
  display: inline-block;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 85%, #f4f0e3 15%);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
}

h1 {
  margin-top: 1rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 18ch;
}

.hero p {
  margin-top: 1rem;
  max-width: 64ch;
  color: #22322d;
  font-size: 1.05rem;
}

.banner-strip {
  margin: 0.4rem 0 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent-2);
  border-radius: 12px;
  background: color-mix(in srgb, #f8f4ea 80%, white 20%);
}

.banner-strip p {
  margin: 0;
  font-weight: 500;
  color: #2b372f;
}

.cta-row {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  border: 1px solid var(--line);
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #f5faf7;
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #0b4634;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(11, 70, 52, 0.22);
}

.btn-secondary {
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 70%, var(--surface) 30%);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(56, 66, 61, 0.18);
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-top: 1.6rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 24px var(--shadow);
  animation: rise-in 520ms ease-out both;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card p,
.card li {
  color: #2e3933;
}

.card-callout {
  border-left: 6px solid var(--accent);
  background:
    linear-gradient(135deg, #f8f5ec 0%, #f2ecdd 100%);
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.col-8 {
  grid-column: span 8;
}

.col-12 {
  grid-column: span 12;
}

section {
  padding: 2rem 0;
}

section h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 0.8rem;
}

.note {
  border-left: 4px solid var(--accent-2);
  background: #fff7e8;
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
}

ul,
ol {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.4rem;
}

.timeline {
  border-left: 2px solid var(--line);
  margin: 1rem 0 0;
  padding-left: 1rem;
}

.timeline-item {
  margin-bottom: 1rem;
}

.timeline-item h3 {
  margin-bottom: 0.3rem;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.4rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

small code {
  background: #ece7da;
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }

  .hero {
    padding-top: 2.6rem;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .contributor-form {
    flex-direction: column;
  }

  .dr-duck-footer {
    grid-template-columns: 1fr;
  }

  .dr-duck-static {
    max-width: min(280px, 72vw);
  }

  .dr-duck-counter-value {
    font-size: clamp(2.7rem, 18vw, 4.4rem);
  }

  .dr-duck-counter-metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dr-duck-static {
    filter: saturate(0.9);
  }
}

/* Background Image & Form Styles */

#community-desk,
#contributor-intake {
  position: relative;
  background-image:
    radial-gradient(ellipse 800px 600px at center 40%, rgba(243, 239, 228, 0.95), rgba(243, 239, 228, 0.98));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.contributor-form-container {
  background: var(--paper-strong);
  border: 1px solid #d9d2c1;
  height: 100%;
}

.contributor-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "Spectral", Georgia, serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 102, 80, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-alt-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.form-alt-text a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.form-status {
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  background: #eef6f2;
  animation: rise-in 300ms ease-out both;
}

.is-hidden {
  display: none !important;
}

.form-status p {
  margin: 0;
  font-size: 0.95rem;
}

.form-status a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.form-status-success {
  color: var(--accent);
  font-weight: 600;
}

.form-status-warning {
  color: var(--accent-2);
  font-weight: 600;
}
