/* Fredonia Regional Hospital — one stylesheet, no framework, no CDN.
   Palette is taken from the hospital logo: forest green + warm tan. */

:root {
  --green:        #2b633e;
  --green-dark:   #1c4429;
  --green-darker: #14301d;
  --green-tint:   #eef3ef;
  --tan:          #a5824f;
  --tan-light:    #c9a978;
  --ink:          #1b211d;
  --body:         #3f4a43;
  --muted:        #667069;
  --line:         #dfe3e0;
  --cream:        #f7f5f1;
  --white:        #ffffff;
  --red:          #a3231f;
  --radius:       10px;
  --shadow-sm:    0 1px 2px rgba(20,48,29,.06), 0 2px 8px rgba(20,48,29,.06);
  --shadow-md:    0 4px 12px rgba(20,48,29,.09), 0 12px 32px rgba(20,48,29,.08);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --wrap: 1160px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.05rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }
p  { margin: 0 0 1.1em; }
:is(h1,h2,h3,h4) + p { margin-top: 0; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }

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

img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 760px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green-dark); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header */
.topbar { background: var(--green-darker); color: #dfe8e1; font-size: .875rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; justify-content: space-between; padding-block: .45rem; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar .er { display: inline-flex; align-items: center; gap: .5rem; }
.topbar .dot {
  width: .55rem; height: .55rem; border-radius: 50%; background: #ff6b63;
  box-shadow: 0 0 0 3px rgba(255,107,99,.25); flex: none;
}
.topbar-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.masthead { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.masthead .wrap { display: flex; align-items: center; gap: 1rem; min-height: 78px; }
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { width: 260px; max-width: 52vw; }

.nav-toggle {
  display: none; margin-left: auto; background: var(--green); color: #fff; border: 0;
  border-radius: 8px; padding: .6rem .85rem; font: inherit; font-weight: 600; cursor: pointer;
  align-items: center; gap: .5rem;
}
.nav-toggle svg { width: 20px; height: 20px; fill: currentColor; }

.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul { display: flex; align-items: center; gap: .15rem; }
.nav > ul > li { position: relative; }
.nav > ul > li > a {
  display: block; padding: .65rem .7rem; color: var(--ink); font-weight: 600;
  font-size: .95rem; text-decoration: none; border-radius: 7px;
}
.nav > ul > li > a:hover { background: var(--green-tint); color: var(--green-dark); }
.nav a[aria-current="page"] { color: var(--green); box-shadow: inset 0 -3px 0 var(--tan); }

.has-sub > .sub {
  position: absolute; left: 0; top: 100%; min-width: 268px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: .4rem; display: none; z-index: 20;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a {
  display: block; padding: .5rem .7rem; border-radius: 6px; color: var(--body);
  text-decoration: none; font-size: .93rem;
}
.sub a:hover { background: var(--green-tint); color: var(--green-dark); }

.nav-cta {
  display: inline-block; margin-left: .5rem; background: var(--green); color: #fff !important;
  padding: .6rem 1rem; border-radius: 8px; font-weight: 700; font-size: .95rem; text-decoration: none;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--green-dark); }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; padding-bottom: 1rem; }
  .masthead .wrap { flex-wrap: wrap; min-height: 68px; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li > a { padding: .8rem .2rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .has-sub > .sub {
    position: static; display: block; border: 0; box-shadow: none; padding: .25rem 0 .6rem .8rem;
    border-left: 2px solid var(--green-tint); margin: .3rem 0 .6rem;
  }
  .nav-cta { margin: .9rem 0 0; text-align: center; }
}

/* ---------------------------------------------------------------- hero */
.hero { position: relative; background: var(--green-darker); color: #fff; overflow: hidden; }
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(16,40,24,.93) 0%, rgba(16,40,24,.78) 45%, rgba(16,40,24,.45) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(3rem, 7vw, 6.5rem); }
.hero h1 { color: #fff; max-width: 20ch; }
.hero p { color: #e3ece5; font-size: clamp(1.05rem, .98rem + .35vw, 1.25rem); max-width: 56ch; }
.hero .eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--tan-light); margin-bottom: 1rem;
}
.hero.page { --h: 0; }
.hero.page .wrap { padding-block: clamp(2.4rem, 5vw, 4.2rem); }
.hero.page h1 { max-width: 24ch; }

.crumbs { font-size: .85rem; color: #c8d5cb; margin-bottom: .9rem; }
.crumbs a { color: #e8efe9; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { opacity: .6; padding: 0 .4rem; }

.btn {
  display: inline-block; background: var(--green); color: #fff; padding: .8rem 1.35rem;
  border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid var(--green);
}
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn.tan { background: var(--tan); border-color: var(--tan); }
.btn.tan:hover { background: #8d6d3f; border-color: #8d6d3f; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }

/* ---------------------------------------------------------------- sections */
section { padding-block: clamp(2.6rem, 5vw, 4.5rem); }
section.tint { background: var(--cream); }
section.green { background: var(--green-dark); color: #e6eee8; }
section.green :is(h2, h3) { color: #fff; }
section.green a { color: #fff; }

.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head .eyebrow {
  display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--tan); margin-bottom: .5rem;
}
.section-head p { color: var(--muted); margin-bottom: 0; }

.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.card h3 { font-family: var(--sans); font-size: 1.06rem; font-weight: 700; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.card .more { margin-top: auto; padding-top: .9rem; font-weight: 700; font-size: .92rem; text-decoration: none; }
.card .more::after { content: " →"; }
a.card { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--green); }
a.card:hover h3 { color: var(--green-dark); }

.ico {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 9px;
  background: var(--green-tint); color: var(--green); margin-bottom: .9rem; flex: none;
}
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
           stroke-linecap: round; stroke-linejoin: round; }
.quick .ico { margin-bottom: 0; }
.quick .urgent .ico { background: #fdeeed; color: var(--red); }

.quick { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.quick a {
  display: flex; gap: .9rem; align-items: flex-start; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--green); border-radius: var(--radius); padding: 1.15rem 1.25rem;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
}
.quick a:hover { border-color: var(--green); box-shadow: var(--shadow-md); }
.quick a.urgent { border-left-color: var(--red); }
.quick strong { display: block; color: var(--ink); font-size: 1.02rem; }
.quick span { font-size: .9rem; color: var(--muted); }

.stats { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stats .n { font-family: var(--serif); font-size: clamp(2.1rem, 1.6rem + 1.8vw, 3rem); color: #fff; line-height: 1; }
.stats .l { display: block; margin-top: .5rem; font-size: .92rem; color: #c3d3c8; }

.split { display: grid; gap: clamp(1.5rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.05fr .95fr; } .split.rev > :first-child { order: 2; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }

/* ---------------------------------------------------------------- article */
.layout { display: grid; gap: clamp(1.8rem, 4vw, 3rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 940px) { .layout { grid-template-columns: minmax(0,1fr) 320px; } }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; font-family: var(--sans); font-size: 1.1rem; font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose .lede { font-size: 1.15rem; color: var(--ink); }
.prose blockquote {
  margin: 1.6rem 0; padding: .3rem 0 .3rem 1.25rem; border-left: 4px solid var(--tan-light);
  color: var(--ink); font-family: var(--serif); font-size: 1.1rem;
}
.prose blockquote p { margin-bottom: .4rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--cream); font-weight: 700; color: var(--ink); }

.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 1.75rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: .7rem; height: .38rem;
  border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

.callout {
  background: var(--green-tint); border: 1px solid #cfe0d5; border-radius: var(--radius);
  padding: 1.2rem 1.35rem; margin: 1.8rem 0;
}
.callout :is(h2, h3) { margin-top: 0; font-family: var(--sans); font-size: 1.1rem; font-weight: 700; }
.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;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { background: #fdf3ea; border-color: #f0d9bf; }

.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 1.8rem 0; }
.gallery img { border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* sidebar */
.side { display: grid; gap: 1.25rem; }
.side .box { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.side .box h2 { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--tan); margin-bottom: .8rem; }
.side dl { margin: 0; font-size: .95rem; }
.side dt { font-weight: 700; color: var(--ink); }
.side dd { margin: 0 0 .8rem; }
.side dd:last-child { margin-bottom: 0; }
.side ul { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.side li { margin-bottom: .5rem; }
.side li:last-child { margin-bottom: 0; }
.side a { text-decoration: none; }
.side a:hover { text-decoration: underline; }
.side .box.er { background: #fdeeed; border-color: #f2cfcd; }
.side .box.er h2 { color: var(--red); }
.side .box.er .big { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); display: block; }

/* services directory filter */
.filter { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.6rem; }
.filter label { font-weight: 600; color: var(--ink); font-size: .95rem; }
.filter input {
  flex: 1 1 260px; max-width: 380px; font: inherit; padding: .65rem .85rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.filter input:focus-visible { border-color: var(--green); }
.filter .count { color: var(--muted); font-size: .9rem; }
.svc-hidden { display: none !important; }

/* stub notice */
.stub {
  background: #fdf3ea; border: 1px solid #f0d9bf; border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 2rem;
}
.stub h2 { margin-top: 0; font-family: var(--sans); font-size: 1.1rem; }
.stub p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- footer */
footer.site { background: var(--green-darker); color: #c5d4c9; padding-block: clamp(2.5rem, 5vw, 3.5rem) 0; font-size: .95rem; }
footer.site h2 { color: #fff; font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem; }
footer.site a { color: #e2eae4; text-decoration: none; }
footer.site a:hover { color: #fff; text-decoration: underline; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: .5rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.foot-brand img { width: 230px; margin-bottom: 1rem; }
.foot-brand address { font-style: normal; line-height: 1.75; }
.foot-brand .tel { display: inline-block; font-family: var(--serif); font-size: 1.35rem; color: #fff; margin-top: .6rem; }
.colophon {
  margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,.14); padding-block: 1.25rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: .87rem; color: #9db0a3;
}
.colophon ul { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.colophon li { margin: 0; }

/* utility classes used by the page bodies (kept out of style attributes so
   the Content-Security-Policy can stay at style-src 'self') */
.fig { margin: 0 0 2rem; }
.fig.flush { margin: 0; }
.fig figcaption { font-size: .92rem; color: var(--muted); margin-top: .6rem; }
.prose p.mt { margin-top: 2rem; }
.centered { margin-inline: auto; text-align: center; }
.eyebrow.block {
  display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--tan); margin-bottom: .5rem;
}
.btn.outline { background: transparent; border-color: var(--green); color: var(--green); }
.btn.outline:hover { background: var(--green-tint); color: var(--green-dark); }
hr.on-green { border-color: rgba(255,255,255,.15); margin: 2.5rem 0; }

@media print {
  .topbar, .masthead, footer.site, .side, .btn-row { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .hero::after { display: none; }
  .hero { background: none; color: #000; }
  .hero h1, .hero p { color: #000; }
  .hero picture, .hero img { display: none; }
}
