:root {
  --page-bg: #d8d3c4;
  --site-bg: #f7f3e8;
  --module-bg: #fbf8f1;
  --header-blue: #2f4f77;
  --header-blue-dark: #1f3a59;
  --nav-bg: #d7dde5;
  --nav-hover: #eef2f7;
  --title-blue: #4f6f90;
  --title-blue-dark: #3f5f80;
  --line: #8f98a5;
  --line-dark: #65707c;
  --text: #232a32;
  --link: #173a62;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  background-image:
    linear-gradient(rgba(216, 211, 196, 0.6), rgba(216, 211, 196, 0.6)),
    url("assets/Millfield_background.png");
  background-size: auto, cover;
  background-position: center, center;
  background-attachment: scroll, fixed;
  color: var(--text);
  font-family: Verdana, Arial, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.4;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:hover,
a:focus-visible {
  color: #0f2946;
}

.site-shell {
  width: 860px;
  margin: 10px auto 18px;
  border: 1px solid #5f6976;
  background: var(--site-bg);
  box-shadow: 0 0 0 1px #ccd4dd inset;
  zoom: 1.5;
}

/* ===== Header ===== */
.site-header {
  border-bottom: 2px solid #566273;
  background: #d8e0e9;
}

.brand-row {
  padding: 9px 11px 10px;
  background: linear-gradient(#36577f, #243f61);
  border-bottom: 1px solid #173654;
  box-shadow: inset 0 1px 0 rgba(242, 248, 255, 0.2);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f0f5fb;
  text-decoration: none;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: #ffffff;
}

.county-seal {
  width: 66px;
  height: 66px;
  border: 2px solid #d6e0ea;
  border-radius: 50%;
  object-fit: cover;
  background: #dde6f0;
}

.brand-copy h1 {
  margin: 0;
  color: #f6faff;
  font-family: Arial, Tahoma, Verdana, sans-serif;
  font-size: 27px;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 1px 1px 0 rgba(18, 38, 59, 0.55);
}

.brand-copy p {
  margin: 3px 0 0;
  color: #d6e0ec;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  background: linear-gradient(#dce3ec, #c8d1dc);
  border-top: 1px solid #fbfdff;
  border-bottom: 1px solid #909dad;
}

.site-nav a {
  display: block;
  padding: 7px 11px 6px;
  color: #1f3651;
  border-right: 1px solid #9faaba;
  text-decoration: underline;
  font-size: 12px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--nav-hover);
  color: #172c45;
}

.site-nav a.active {
  background: #ffffff;
  color: #0f2946;
  font-weight: 700;
}

/* ===== Main Layout ===== */
.page-main {
  margin: 9px 10px 11px;
  display: grid;
  gap: 9px;
}

.panel {
  border: 1px solid #8d97a3;
  background: var(--module-bg);
  padding: 8px 9px 10px;
}

.panel h2 {
  margin: -8px -9px 8px;
  padding: 5px 8px;
  border-bottom: 1px solid #304e6c;
  background: linear-gradient(var(--title-blue), var(--title-blue-dark));
  color: #ffffff;
  font-family: Verdana, Arial, Tahoma, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.section-intro {
  margin: 0 0 8px;
  color: #3a4552;
}

.welcome-panel p {
  max-width: none;
  margin: 0 0 7px;
  line-height: 1.42;
}

.quick-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-links a,
.back-link {
  display: inline-block;
  padding: 3px 8px;
  color: #143456;
  text-decoration: underline;
  border: 1px solid #7a8694;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #6d7683;
  border-bottom-color: #6d7683;
  background: #e7ebf0;
  font-size: 11px;
}

.quick-links a:hover,
.quick-links a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  background: #f4f7fa;
}

/* ===== Homepage Rotator ===== */
.carousel {
  position: relative;
  padding: 0 30px;
}

.carousel-viewport {
  overflow: hidden;
  border: 1px solid #9aa4b1;
  background: #ffffff;
}

.carousel-track {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  transition: transform 380ms ease;
}

.news-slide {
  min-width: 100%;
  opacity: 0.72;
  transition: opacity 180ms ease;
}

.news-slide.is-active {
  opacity: 1;
}

.news-slide img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-bottom: 1px solid #c0c7d1;
}


.slide-text {
  padding: 7px 8px 8px;
  background: #f4f6f9;
}

.slide-text h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-family: Verdana, Arial, Tahoma, sans-serif;
  color: #1f3d5e;
}

.slide-text h3 a {
  color: #1f3d5e;
}

.slide-text p {
  margin: 0;
  color: #3f4a57;
  font-size: 12px;
}

.carousel-control {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 1px solid #7d8693;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #626a76;
  border-bottom-color: #626a76;
  border-radius: 0;
  background: #d8dde4;
  color: #1f3854;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: #eef2f6;
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

.carousel-dots {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 1px solid #7d8794;
  border-radius: 0;
  background: #d5dce5;
  cursor: pointer;
}

.carousel-dot:hover,
.carousel-dot:focus-visible {
  background: #e8edf4;
}

.carousel-dot.is-active {
  background: #5b6f84;
}

/* ===== List / Directory Pages ===== */
.department-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.department-card,
.news-card,
.staff-card,
.contact-card {
  border: 1px solid #a3adba;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  background: #ffffff;
  padding: 7px 8px;
}

.department-card h3,
.news-card h3,
.staff-card h3,
.contact-card h3 {
  margin: 0 0 3px;
  color: #1f3d5e;
  font-size: 13px;
  font-family: Verdana, Arial, Tahoma, sans-serif;
}

.department-card p,
.news-card p,
.staff-card p,
.contact-card p {
  margin: 0 0 4px;
}

.meta-line,
.news-date,
.staff-title,
.article-meta {
  color: #566474;
  font-size: 11px;
}

.news-list {
  display: grid;
  gap: 6px;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

/* ===== Article Pages ===== */
.article-panel {
  max-width: 740px;
  margin: 0 auto;
}

.featured-media {
  margin: 0 0 9px;
  padding: 3px;
  border: 1px solid #8f98a5;
  background: #ffffff;
}

.featured-media img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.article-panel p {
  margin: 0 0 9px;
}

.article-quote {
  margin: 0 0 9px;
  padding: 0;
  border: none;
  background: transparent;
}

.article-quote p {
  margin: 0;
  color: #1e3652;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.article-quote cite {
  display: block;
  margin-top: 5px;
  color: #425367;
  font-size: 11px;
  font-style: normal;
}

.article-followup {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-followup p {
  margin-bottom: 7px;
}

.article-link-wrap {
  margin: 0;
}

.back-link-wrap {
  margin-top: 10px;
}

/* ===== Footer ===== */
.site-footer {
  margin: 10px;
  margin-top: 0;
  padding: 8px 10px 9px;
  border: 1px solid #1f344b;
  border-top-color: #3a577b;
  background: linear-gradient(#2f4b6b, #243e5a);
  color: #e4edf7;
  font-size: 11px;
}

.footer-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 12px;
}

.site-footer p {
  margin: 0 0 4px;
}

.footer-links {
  margin: 5px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #d7e4f2;
  text-decoration: underline;
}

.footer-era-meta {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed #7e90a4;
  color: #c5d3e4;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
}

/* ===== Floating Utility (2002 desktop look) ===== */
.utility-toggle {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid #657180;
  border-top-color: #f4f6f8;
  border-left-color: #f4f6f8;
  border-right-color: #55606f;
  border-bottom-color: #55606f;
  background: linear-gradient(#f1f3f6, #b5beca);
  color: #233a56;
  font: 700 11px Verdana, Arial, Tahoma, sans-serif;
  cursor: pointer;
  z-index: 1000;
}

.utility-toggle:hover,
.utility-toggle:focus-visible {
  background: linear-gradient(#fafcff, #c6cfd9);
}

.utility-window {
  position: fixed;
  width: min(330px, calc(100vw - 14px));
  min-height: 238px;
  border: 2px solid #8f9cac;
  border-top-color: #dbe2ea;
  border-left-color: #dbe2ea;
  border-right-color: #5f6a77;
  border-bottom-color: #5f6a77;
  background: #e7ecf2;
  display: none;
  z-index: 1001;
}

.utility-window.is-open {
  display: block;
}

.utility-window.is-dragging {
  user-select: none;
}

.utility-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 5px;
  border-bottom: 1px solid #7b8898;
  background: linear-gradient(#4a6f97, #2c4d73);
  cursor: move;
}

.utility-titlebar h2 {
  margin: 0;
  color: #f3f7fb;
  font: 700 11px Verdana, Arial, Tahoma, sans-serif;
}

.utility-close {
  width: 20px;
  height: 19px;
  border: 1px solid #8b92a0;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  border-right-color: #6f7783;
  border-bottom-color: #6f7783;
  background: #dde3ea;
  color: #1f334a;
  font: 700 11px Verdana, Arial, Tahoma, sans-serif;
  cursor: pointer;
}

.utility-close:hover,
.utility-close:focus-visible {
  background: #f3f6fa;
}

.utility-content {
  padding: 6px;
}

.utility-content label {
  display: block;
  margin-bottom: 3px;
  color: #2a415b;
  font-size: 11px;
}

.utility-content textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid #8e98a5;
  background: #ffffff;
  color: #202830;
  font: 12px/1.4 Tahoma, Arial, Verdana, sans-serif;
  padding: 5px;
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .site-shell {
    width: 96%;
    min-width: 0;
  }

  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-slide img {
    height: 200px;
  }
}

@media (max-width: 700px) {
  .site-nav a {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #c0c9d4;
  }

  .carousel {
    padding: 0;
  }

  .carousel-control {
    top: auto;
    bottom: -28px;
    transform: none;
  }

  .carousel-prev {
    left: calc(50% - 44px);
  }

  .carousel-next {
    right: calc(50% - 44px);
  }

  .carousel-dots {
    margin-top: 18px;
  }

  .staff-grid,
  .contact-grid,
  .department-grid {
    grid-template-columns: 1fr;
  }

  .featured-media img {
    height: 210px;
  }
}
