/* Scale the browser's base rem unit to 90% (closer to standard Cambridge sizing).
   This handles all Tailwind rem-based classes (nav items, buttons, utilities)
   and any elements that inherit font size. */
html {
  font-size: 90%;
}

/* Give the browser chrome a neutral background */
body {
  background-color: #d6dde5;
  margin: 0;
  padding: 0;
}

/* Constrain the site to 85% of viewport, centred */
.camcead-site-wrapper {
  width: 85%;
  max-width: 1600px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.12);
  min-height: 100vh;
}

/* ── Mobile responsiveness ──────────────────────────────────────────────── */
/* ── Global: prevent any image/figure from overflowing its container ── */
img { max-width: 100%; height: auto; }
figure { max-width: 100%; margin-left: 0; margin-right: 0; }
figure img { width: 100%; height: auto; }
iframe, video, embed, object { max-width: 100%; }

/* ── Page content wrapper ── */
.camcead-page-content {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}
/* Tables in body content: scroll horizontally rather than overflow */
.camcead-page-content table,
.camcead-project-body table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}
/* Pre/code blocks: scroll rather than overflow */
.camcead-page-content pre,
.camcead-project-body pre {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
/* Long URLs and unbreakable strings in project body */
.camcead-project-body {
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 900px) {
  .camcead-site-wrapper {
    width: 100%;
    box-shadow: none;
  }
  /* Carousel column: full width and stacks below text on mobile */
  .camcead-carousel-col {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Reduce carousel height on mobile */
  #camcead-carousel {
    height: 220px !important;
  }
  /* Homepage: stack main content and sidebar vertically */
  .camcead-home-row {
    flex-direction: column !important;
    gap: 2rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .camcead-home-main {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  .camcead-home-sidebar {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  /* Generic page container: reduce padding, stack sidebar below content */
  .camcead-page-container {
    flex-direction: column !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    gap: 1.5rem !important;
  }
  .camcead-page-container aside {
    width: 100% !important;
  }
  /* Project banner: stack logo + title/project-logo vertically */
  .camcead-project-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1.25rem !important;
    gap: 1rem !important;
    min-height: unset !important;
  }
  /* Project page: stack sidebar below main content */
  .camcead-project-layout {
    flex-direction: column !important;
  }
  .camcead-project-sidebar {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  /* Project main-content column: .camcead-project-layout switches to
     flex-direction:column above, and in column mode flex items are
     cross-axis (width) stretched — but browsers still let an item grow
     past that stretched width if its content needs more room (e.g.
     .plato-pipeline's nowrap chain of fixed-min-width nodes). min-width:0
     has no effect on the cross axis; only an explicit width forces it,
     the same way .camcead-project-sidebar is already handled below. */
  .camcead-project-main {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Project body: prevent any content from overflowing */
  .camcead-project-body img,
  .camcead-project-body figure,
  .camcead-project-body iframe,
  .camcead-project-body video {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* -------------------------------------------------------
   Scale px-based cambridge_tailwind text classes to 80%.
   These use fixed px values so they don't respond to the
   html font-size change above — must be overridden explicitly.
   Higher selector specificity wins over all breakpoints.
------------------------------------------------------- */

/* Project page — left-floated image block (bypasses wysiwyg_cleanup inline-style stripping) */
.project-img-left {
  float: left;
  max-width: 48%;
  margin: 0 2rem 1.5rem 0;
}
.project-img-left img {
  width: 100%;
  border-radius: 0.5rem;
  display: block;
}
.project-img-left figcaption {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.4rem;
  text-align: center;
}

/* ── PLATO project page layout classes ─────────────────────────────────── */

/* Data-pipeline flow strip */
.plato-pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #f0f4f8;
  border: 1px solid #d1dbe6;
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.plato-pipeline-node {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 0 0.5rem;
  position: relative;
  font-size: 0.8rem;
  color: #374151;
}
.plato-pipeline-node strong {
  display: block;
  font-size: 0.85rem;
  color: #003366;
  margin-bottom: 0.2rem;
}
.plato-pipeline-node.camcead-node {
  background: rgba(0,51,102,0.07);
  border-radius: 0.5rem;
  border: 1px solid rgba(0,51,102,0.2);
}
.plato-pipeline-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: #003366;
  font-weight: 700;
  font-size: 1rem;
}

/* Card grid for project detail cards */
.plato-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
  width: 100%;
  box-sizing: border-box;
}
.plato-card {
  border: 1px solid #d1dbe6;
  border-radius: 0.75rem;
  padding: 1.25rem;
  background: #f8fafc;
  border-top: 3px solid #003366;
}
.plato-card h3 {
  margin: 0 0 0.6rem;
  color: #003366;
  font-size: 1rem;
}
.plato-card p {
  margin: 0 0 0.5rem;
  color: #4b5563;
  font-size: 0.9rem;
}
.plato-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: #4b5563;
  font-size: 0.875rem;
}
.plato-card ul li { margin-bottom: 0.35rem; }

/* CETRA highlight card */
.plato-card-highlight {
  border: 1px solid #003366;
  border-top: 3px solid #1d4ed8;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: #f0f4ff;
  margin: 1.5rem 0;
}
.plato-card-highlight h3 {
  margin: 0 0 0.75rem;
  color: #1d4ed8;
  font-size: 1.05rem;
}
.plato-card-highlight p { color: #374151; font-size: 0.9rem; margin: 0 0 0.75rem; }
.plato-card-highlight ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1.5rem;
  padding-left: 1.1rem;
  color: #374151;
  font-size: 0.875rem;
  margin: 0;
}
.plato-card-highlight ul li { margin-bottom: 0.2rem; }

/* ── Shared coloured tag pills (used on WEAVE, MOONS and future project pages) ── */

.camcead-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 0.75rem;
}
.camcead-tag-blue   { background: #0b2545; }
.camcead-tag-cyan   { background: #2aa9c9; }
.camcead-tag-green  { background: #0e4a4a; }
.camcead-tag-purple { background: #6a5a9c; }
.camcead-tag-orange { background: #0e4a4a; }
.camcead-tag-gold   { background: #0b2545; }

/* ── WEAVE project page layout classes ─────────────────────────────────── */

/* Stats bar */
.weave-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  width: 100%;
  box-sizing: border-box;
}
.weave-stat {
  background: #f0f4f8;
  border: 1px solid #d1dbe6;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.weave-stat b {
  display: block;
  font-size: 1.5rem;
  color: #003366;
}
.weave-stat span {
  font-size: 0.82rem;
  color: #607086;
}

/* Horizontal dataflow strip */
.weave-flow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}
.weave-node {
  background: white;
  border: 2px solid #d9e4f2;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  min-width: 100px;
  text-align: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: #003366;
}
.weave-node.primary {
  background: #003366;
  color: white;
  border-color: #003366;
}
.weave-arrow {
  font-size: 1.3rem;
  color: #1f77b4;
  font-weight: 900;
  flex-shrink: 0;
}

/* CAMCEAD role diagram (3-col, centre hub) */
.weave-diagram {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.weave-diagram-hub {
  grid-column: 1 / -1;
  text-align: center;
  background: linear-gradient(135deg, #003366, #184e9a);
  color: white;
  border-radius: 1.25rem;
  padding: 1.25rem;
  font-size: 1.1rem;
  font-weight: 900;
}
.weave-mini {
  background: white;
  border: 1px solid #e5ebf5;
  border-radius: 1.25rem;
  padding: 1.1rem 1.25rem;
}
.weave-mini h4 {
  margin: 0 0 0.4rem;
  color: #003366;
  font-size: 0.9rem;
}
.weave-mini p {
  margin: 0;
  font-size: 0.82rem;
  color: #425066;
}

/* Daily lifecycle timeline (6 steps) */
.weave-timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.875rem;
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.weave-timeline-step {
  position: relative;
  background: #f8fbff;
  border: 1px solid #dbe6f4;
  border-radius: 1rem;
  padding: 1rem 0.875rem;
  min-height: 110px;
  font-size: 0.8rem;
  color: #374151;
}
.weave-timeline-step b {
  display: block;
  color: #003366;
  margin-bottom: 0.3rem;
}
.weave-timeline-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -12px;
  top: 40%;
  color: #1f77b4;
  font-weight: 900;
  font-size: 1rem;
}

/* Infrastructure grid */
.weave-infra {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.1rem;
  margin: 1.25rem 0;
}
.weave-resource {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.weave-resource-item {
  background: #f7fbff;
  border: 1px solid #dce9f8;
  border-radius: 1rem;
  padding: 0.875rem;
  text-align: center;
}
.weave-resource-item b {
  display: block;
  color: #003366;
  font-size: 1.2rem;
}
.weave-resource-item span {
  font-size: 0.75rem;
  color: #607086;
}

/* Note / callout box */
.weave-note {
  background: #fff8e5;
  border-left: 4px solid #f2b632;
  padding: 1rem 1.1rem;
  border-radius: 0 0.75rem 0.75rem 0;
  color: #5a430b;
  font-size: 0.875rem;
  margin-top: 1.25rem;
}

/* ── News article figures ───────────────────────────────────────────────── */

.news-figure {
  margin: 1.5rem 0;
}
.news-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  display: block;
}
.news-figure figcaption {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
  font-style: italic;
}
.news-figure img.img-half {
  max-width: 50%;
}
.news-figure img.img-sixty {
  max-width: 60%;
}

/* ── 4MOST project page layout classes ─────────────────────────────────── */

/* Milestone timeline (horizontal, compact) */
.fourmost-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.fourmost-timeline-step {
  position: relative;
  background: #f8fbff;
  border: 1px solid #dbe6f4;
  border-radius: 1rem;
  padding: 0.875rem 0.75rem;
  min-height: 100px;
  font-size: 0.78rem;
  color: #374151;
}
.fourmost-timeline-step.milestone {
  background: #f0f4ff;
  border-color: #003366;
  border-top: 3px solid #003366;
}
.fourmost-timeline-step b {
  display: block;
  color: #003366;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}
.fourmost-timeline-step .date {
  display: block;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}
.fourmost-timeline-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -11px;
  top: 38%;
  color: #003366;
  font-weight: 900;
  font-size: 1rem;
}

/* Survey category two-column table */
.fourmost-surveys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.25rem 0 2rem;
}
.fourmost-survey-group {
  background: #f8fafc;
  border: 1px solid #d1dbe6;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
}
.fourmost-survey-group h4 {
  margin: 0 0 0.6rem;
  color: #003366;
  font-size: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #003366;
}
.fourmost-survey-group ul {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.82rem;
  color: #374151;
}
.fourmost-survey-group ul li { margin-bottom: 0.3rem; }

/* ── MOONS project page layout classes ─────────────────────────────────── */

/* Spec-highlight stat pills */
.moons-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 2rem;
}
.moons-stat {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #f0f4f8;
  border: 1px solid #d1dbe6;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #003366;
  font-weight: 600;
  white-space: nowrap;
}

/* Data-flow pipeline strip (shares logic with .plato-pipeline) */
.moons-pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #f0f4f8;
  border: 1px solid #d1dbe6;
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.moons-pipeline-node {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 0 0.5rem;
  position: relative;
  font-size: 0.78rem;
  color: #374151;
}
.moons-pipeline-node strong {
  display: block;
  font-size: 0.82rem;
  color: #003366;
  margin-bottom: 0.2rem;
}
.moons-pipeline-node.camcead-node {
  background: rgba(0,51,102,0.07);
  border-radius: 0.5rem;
  border: 1px solid rgba(0,51,102,0.2);
}
.moons-pipeline-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: #003366;
  font-weight: 700;
  font-size: 1rem;
}

/* Partners list */
.moons-partners {
  padding-left: 0;
  list-style: none;
  margin: 1rem 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
}
.moons-partners li {
  font-size: 0.875rem;
  color: #374151;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f3f4f6;
}

/* Software components list */
.moons-software {
  padding-left: 0;
  list-style: none;
  margin: 1rem 0 2rem;
}
.moons-software li {
  font-size: 0.875rem;
  color: #374151;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #003366;
  margin-bottom: 0.5rem;
  background: #f8fafc;
  border-radius: 0 0.375rem 0.375rem 0;
}

/* Heading scales */
.camcead-site-wrapper .text-style-heading-title    { font-size: 36px; }
.camcead-site-wrapper .text-style-heading-display  { font-size: 32px; }
.camcead-site-wrapper .text-style-heading-lg       { font-size: 26px; }
.camcead-site-wrapper .text-style-heading-md       { font-size: 24px; }
.camcead-site-wrapper .text-style-heading-sm       { font-size: 18px; }
.camcead-site-wrapper .text-style-heading-xs,
.camcead-site-wrapper .text-style-heading-xs-serif { font-size: 16px; }

/* Body scales */
.camcead-site-wrapper .text-style-body-lg                          { font-size: 18px; }
.camcead-site-wrapper .text-style-body-md,
.camcead-site-wrapper .text-style-body-md-semibold                 { font-size: 16px; }
.camcead-site-wrapper .text-style-body-sm,
.camcead-site-wrapper .text-style-body-sm-semibold                 { font-size: 14px; }

/* text-size utilities used in header / nav */
.camcead-site-wrapper .text-size-1 { font-size: 13px; }
.camcead-site-wrapper .text-size-2 { font-size: 14px; }
.camcead-site-wrapper .text-size-3 { font-size: 15px; }
.camcead-site-wrapper .text-size-4 { font-size: 17px; }
.camcead-site-wrapper .text-size-5 { font-size: 20px; }

/* Other component classes with explicit px font sizes */
.camcead-site-wrapper .card-link--description { font-size: 12px; }
.camcead-site-wrapper .input-text             { font-size: 12px; }

/* Fade the banner's bottom edge into the feature row's background colour
   instead of cutting straight from photo to flat colour. */
#camcead-banner-wrap::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 36px;
  background: linear-gradient(to bottom, rgba(240,245,251,0) 0%, #f0f5fb 100%);
  pointer-events: none;
}

/* ── Feature row (4 coloured cards below banner) ─────────────────────────── */
/* Pulled up over the banner's bottom edge (negative margin) so the two
   blocks read as one hero unit instead of two stacked slabs with a hard
   seam. The banner itself fades to this same background colour at its
   base (see #camcead-banner-wrap::after) so the cards land on a colour
   the image has already faded into, not a flat cut. */
.camcead-feature-row {
  background: #f0f5fb;
  position: relative;
  margin-top: -2.5rem;
  z-index: 2;
}
.camcead-feature-card {
  border-radius: 9px !important;
  box-shadow: 0 6px 20px rgba(11, 37, 69, 0.16);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.camcead-feature-card:hover {
  box-shadow: 0 10px 28px rgba(11, 37, 69, 0.22);
  transform: translateY(-2px);
}

/* ── Sidebar widget boxes ─────────────────────────────────────────────────── */
.camcead-sidebar-box {
  margin-bottom: 1.5rem;
  border: 1px solid #e0e7ef;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.camcead-sidebar-box:last-child {
  margin-bottom: 0;
}
.camcead-sidebar-box__header {
  background: linear-gradient(90deg, #003366 0%, #004080 100%);
  color: white;
  padding: 0.75rem 1rem;
  margin: 0;
}

/* ── Astronomy dark strip ─────────────────────────────────────────────────── */
.camcead-astro-strip {
  background: linear-gradient(135deg, #050e1f 0%, #001233 45%, #0d2047 75%, #131d3a 100%);
  color: #e2e8f0;
  padding: 2.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.camcead-astro-strip__quote {
  font-size: 1rem;
  font-style: italic;
  margin: 0 0 1.5rem;
  opacity: 0.88;
  letter-spacing: 0.015em;
  line-height: 1.6;
}
.camcead-astro-strip__stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
}
.camcead-astro-strip__stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #60a5fa;
  display: block;
}
.camcead-astro-strip__stat-label {
  font-size: 0.75rem;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

/* ── Project page custom layout — mobile/tablet overrides ───────────────── */
@media (max-width: 900px) {

  /* Shared: plato-cards grid — keep auto-fill but lower minmax so 1 col fits */
  .plato-cards {
    grid-template-columns: 1fr;
  }
  /* plato-card-highlight two-column list → single column */
  .plato-card-highlight ul {
    grid-template-columns: 1fr;
  }

  /* WEAVE: 4-col stats → 2-col */
  .weave-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  /* WEAVE: 6-col timeline — let it scroll at original width */
  .weave-timeline {
    overflow-x: auto;
  }
  /* WEAVE: 4-col resource grid → 2-col */
  .weave-resource {
    grid-template-columns: repeat(2, 1fr);
  }
  /* WEAVE: 2-col infra → single col */
  .weave-infra {
    grid-template-columns: 1fr;
  }
  /* WEAVE: 2-col diagram → single col */
  .weave-diagram {
    grid-template-columns: 1fr;
  }

  /* 4MOST: 2-col survey groups → single col */
  .fourmost-surveys {
    grid-template-columns: 1fr;
  }
  /* 4MOST: 5-col timeline — let it scroll */
  .fourmost-timeline {
    overflow-x: auto;
  }

  /* MOONS: 2-col partners list → single col */
  .moons-partners {
    grid-template-columns: 1fr;
  }
  /* MOONS/4MOST: stat pills — allow long labels to wrap instead of
     forcing horizontal overflow (nowrap is fine at desktop widths but
     "≥25 million targets" etc. don't fit on a phone screen) */
  .moons-stat {
    white-space: normal;
  }
}

/* ── Footer column dividers ──────────────────────────────────────────────── */
.camcead-footer-cols {
  gap: 0 !important;
}
.camcead-footer-cols > div {
  padding: 0 2rem;
}
.camcead-footer-cols > div:first-child {
  padding-left: 0;
}
.camcead-footer-cols > div:not(:first-child) {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}
@media (max-width: 767px) {
  .camcead-footer-cols > div {
    padding: 0;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
  }
  .camcead-footer-cols > div:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }
}

/* ── Project page body ───────────────────────────────────────────────────── */
.camcead-project-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #001f4d;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #e0e7ef;
}
.camcead-project-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #003366;
  margin: 1.5rem 0 0.5rem;
}
.camcead-project-body p {
  line-height: 1.7;
  color: #374151;
  margin-bottom: 0.9rem;
}
.camcead-project-body ul, .camcead-project-body ol {
  margin: 0.5rem 0 1rem 1.25rem;
  color: #374151;
  line-height: 1.7;
}
.camcead-project-body li { margin-bottom: 0.3rem; }
.camcead-project-body a { color: #1d4ed8; }

/* ── Section heading accent (used on Latest News, etc.) ─────────────────── */
.camcead-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #003366;
}
.camcead-section-heading h2 {
  margin: 0;
  color: #001f4d;
}

/* ── Search results ───────────────────────────────────────────────────────── */
.camcead-search-result {
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.camcead-search-result:last-child {
  border-bottom: none;
}
.camcead-search-result__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}
.camcead-search-result__title a {
  color: #1d4ed8;
  text-decoration: none;
}
.camcead-search-result__title a:hover {
  text-decoration: underline;
}
.camcead-search-result__snippet {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.5;
}
.camcead-search-result__meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  gap: 1rem;
}
.camcead-search-result__type {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-weight: 500;
  text-transform: capitalize;
}

/* ── What is CamCEAD page (node 8) ──────────────────────────────────────── */
.camcead-what-page {
  padding: 2rem 0 3rem;
  max-width: 52rem;
}

/* Section headings */
.camcead-what-page .field--name-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #003366;
  padding-left: 0.75rem;
  border-left: 4px solid #003366;
  margin: 2.75rem 0 1.25rem;
  line-height: 1.3;
}

/* Body text */
.camcead-what-page .field--name-body p {
  line-height: 1.75;
  color: #1f2937;
  margin-bottom: 0.9rem;
}

/* All images: force consistent full-width, no float, rounded */
.camcead-what-page .field--name-body img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  float: none !important;
  display: block !important;
  border-radius: 0.5rem;
  box-shadow: 0 3px 16px rgba(0, 20, 60, 0.13);
  margin: 0 auto !important;
}

/* Feature image block: div containing img directly */
.camcead-what-page .field--name-body > div:not(:empty) {
  margin: 2rem 0;
}

/* Caption paragraphs inside feature image blocks */
.camcead-what-page .field--name-body > div > p {
  font-size: 0.82rem;
  color: #6b7280;
  font-style: italic;
  margin: 0.4rem 0 0;
}

/* Project grid: outer div containing child divs → CSS grid */
.camcead-what-page .field--name-body > div:has(> div) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
  margin: 1.75rem 0;
}

/* Each project card inside the grid */
.camcead-what-page .field--name-body > div:has(> div) > div {
  background: #f8fafc;
  border: 1px solid #e0e7ef;
  border-radius: 0.5rem;
  padding: 1rem;
}
.camcead-what-page .field--name-body > div:has(> div) > div p {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.camcead-what-page .field--name-body > div:has(> div) > div img {
  margin-top: 0.75rem !important;
  box-shadow: none;
}

/* Lists */
.camcead-what-page .field--name-body ul,
.camcead-what-page .field--name-body ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: #1f2937;
  line-height: 1.75;
}
.camcead-what-page .field--name-body li { margin-bottom: 0.4rem; }
.camcead-what-page .field--name-body a  { color: #1d4ed8; }

/* ── User profile / member area ───────────────────────────────── */
.camcead-profile-page { max-width: 52rem; padding: 2.5rem 0 3rem; }
.camcead-profile-header { margin-bottom: 2.5rem; }
.camcead-profile-title { font-size: 1.6rem; font-weight: 700; color: #003366; margin-bottom: 0.5rem; }
.camcead-profile-subtitle { color: #4b5563; font-size: 1rem; }
.camcead-profile-section-title { font-size: 1.2rem; font-weight: 700; color: #003366;
  border-left: 4px solid #003366; padding-left: 0.75rem; margin-bottom: 1.5rem; }
.camcead-internal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.camcead-internal-card {
  display: flex; align-items: flex-start; gap: 1rem;
  background: #f8fafc; border: 1px solid #e0e7ef; border-radius: 0.5rem;
  padding: 1.25rem; text-decoration: none; color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.camcead-internal-card:hover {
  box-shadow: 0 4px 16px rgba(0,20,60,0.10); border-color: #003366;
}
.camcead-internal-card__icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.375rem; flex-shrink: 0;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.camcead-internal-card__body {
  display: flex; flex-direction: column; gap: 0.2rem;
}
.camcead-internal-card__body strong { font-size: 1rem; font-weight: 700; color: #003366; }
.camcead-internal-card__body span   { font-size: 0.875rem; color: #6b7280; }

/* ── Login page wallpaper ─────────────────────────────────────── */
.camcead-login-wallpaper {
  background: linear-gradient(160deg, #001a3a 0%, #003366 55%, #00539f 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-image: none !important;
}
.camcead-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 3rem 2.5rem;
  text-align: center;
}
.camcead-login-logo {
  width: min(280px, 75%);
  height: auto;
  filter: brightness(0) invert(1);
}
.camcead-login-tagline {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0;
  font-style: italic;
}
.camcead-login-cam-logo {
  width: min(220px, 60%);
  height: auto;
  opacity: 0.9;
}

/* ── Contact page ─────────────────────────────────────────────── */
.camcead-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.camcead-contact-card {
  border: 1px solid #d1dbe6;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-top: 3px solid #003366;
}
.camcead-contact-card h2 {
  margin: 0 0 0.75rem;
  color: #003366;
  font-size: 1.05rem;
}
.camcead-contact-card p {
  margin: 0 0 0.4rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.6;
}
.camcead-contact-card a { color: #1d4ed8; }
.camcead-contact-map {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid #d1dbe6;
  border-radius: 0.75rem;
  background: #f0f4f8;
}
.camcead-contact-map h2 {
  margin: 0 0 0.6rem;
  color: #003366;
  font-size: 1.05rem;
}
.camcead-contact-map p {
  margin: 0 0 1rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.6;
}
.camcead-map-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #003366;
  color: #fff !important;
  padding: 0.65rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
}
.camcead-map-button:hover { background: #002347; }

@media (max-width: 900px) {
  .camcead-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ── My Profile self-service form ─────────────────────────────── */
.camcead-myprofile-page { max-width: 40rem; }

.camcead-myprofile-page .form-item {
  margin-bottom: 1.75rem;
}
/* Field-level labels ("Job Title", "PDF file", etc). Excludes radio-option
   labels below, which wrap their <input> directly and must stay flex-row
   (this rule was originally unscoped and silently broke the Visibility /
   Type / Report kind radios by forcing their labels to stack above the
   circle instead of beside it). */
.camcead-myprofile-page label:not(:has(input)) {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0b2545;
  margin-bottom: 0.4rem;
}

/* Radio-option rows (Type, Visibility, Report kind) */
.camcead-myprofile-page fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.camcead-myprofile-page fieldset legend {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0b2545;
  margin-bottom: 0.6rem;
  padding: 0;
}
.camcead-myprofile-page fieldset label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 0.9375rem;
  color: #111827;
  margin-bottom: 0;
  cursor: pointer;
}
.camcead-myprofile-page fieldset input[type="radio"] {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: #146b82;
}
.camcead-myprofile-page input[type="text"],
.camcead-myprofile-page input[type="url"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1dbe6;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.camcead-myprofile-page input[type="text"]:focus,
.camcead-myprofile-page input[type="url"]:focus {
  outline: none;
  border-color: #146b82;
  box-shadow: 0 0 0 3px rgba(20, 107, 130, 0.15);
}
.camcead-myprofile-page .description {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Photo upload widget */
.camcead-myprofile-page .form-managed-file {
  padding: 1.25rem;
  border: 1px dashed #d1dbe6;
  border-radius: 0.625rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.camcead-myprofile-page .form-managed-file input[type="file"] {
  font-size: 0.875rem;
}

/* Buttons: Upload/Remove (secondary, outline) vs Save (primary, filled) */
.camcead-myprofile-page .form-submit {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.125rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #d1dbe6;
  background: #fff;
  color: #0b2545;
  transition: background 0.15s, border-color 0.15s;
}
.camcead-myprofile-page .form-managed-file .form-submit:hover {
  background: #eef2f6;
  border-color: #9fb3c8;
}
.camcead-myprofile-page .form-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}
.camcead-myprofile-page .form-actions .form-submit,
.camcead-myprofile-page .form-actions .button--primary {
  padding: 0.6875rem 1.5rem;
  font-size: 0.9375rem;
  border: none;
  background: linear-gradient(90deg, #0b2545 0%, #146b82 100%);
  color: #fff;
}
.camcead-myprofile-page .form-actions .form-submit:hover,
.camcead-myprofile-page .form-actions .button--primary:hover {
  background: linear-gradient(90deg, #08192f 0%, #0f5266 100%);
}
.camcead-myprofile-cancel {
  padding: 0.6875rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none !important;
  border-radius: 0.5rem;
  transition: background 0.15s;
}
.camcead-myprofile-cancel:hover {
  background: #f3f4f6;
}

/* ── Memorial pages (tribute text is filtered body content, so block-level
   inline styles get stripped by wysiwyg_cleanup -- classes only) ────────── */
.camcead-memorial-photo {
  float: left;
  width: 220px;
  max-width: 40%;
  height: auto;
  margin: 0.25rem 1.75rem 1rem 0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.15);
}
.camcead-memorial-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b2545;
  margin: 0 0 0.375rem;
}
.camcead-memorial-byline {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #146b82;
  font-style: italic;
  margin: 0 0 1.25rem;
}
.camcead-memorial-notice {
  background: #f0f4f8;
  border-left: 3px solid #003366;
  padding: 1rem 1.25rem;
  border-radius: 0 3px 3px 0;
  margin: 0 0 1.5rem;
  max-width: 42rem;
  box-sizing: border-box;
  font-size: 0.875rem;
}
.camcead-memorial-body {
  max-width: 42rem;
  line-height: 1.75;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}
.camcead-memorial-body p {
  margin: 0 0 1.15rem;
  text-align: justify;
  text-align-last: left;
}
@media (max-width: 600px) {
  .camcead-memorial-photo {
    float: none;
    display: block;
    width: 200px;
    max-width: 100%;
    margin: 0 auto 1.25rem;
  }
}

/* ── Main menu focus outline ──────────────────────────────────────────────
   The base theme's `.focus-visible:focus-light` utility uses a bright
   red/pink outline (#de0051) intended as a generic accessibility focus
   ring. On the top nav it read as an error state. Restyled to the site's
   navy so keyboard-focus is still visible (removing it entirely would
   hurt keyboard-only accessibility) without looking alarming. */
#block-camcead-theme-main-menu a:focus-visible {
  outline-color: #0b2545 !important;
}

/* ── Sidebar box font size, unified ───────────────────────────────────────
   .camcead-sidebar-box is shared by every sidebar on the site (homepage
   Current Projects/Useful Links/Vacancies/Login boxes, the project page's
   Current Projects/Project Categories boxes, and the generic per-section
   sidebar) -- some had drifted to a larger class (text-style-body-md,
   16px) while others used the smaller one. Match the top main menu's own
   rendered size (14.4px) everywhere, one rule instead of per-template
   fixes. Doesn't touch the small letter-badge spans (font-size set
   directly on those, not inherited here since this only targets a/li/p). */
.camcead-sidebar-box a,
.camcead-sidebar-box li,
.camcead-sidebar-box p {
  font-size: 14.4px !important;
}

