/* ==========================================================
   Common Ground Training – shared stylesheet
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Source+Sans+3:wght@400;500;600&display=swap");

/* ---------- Design tokens ---------- */
:root {
  --teal: #1F4E5F;
  --teal-dark: #163A47;
  --teal-line: #2E5A6A;
  --sand: #F7F3EE;
  --sand-deep: #E9DFD2;
  --border: #E3DACD;
  --white: #FFFFFF;
  --ink: #1E2A30;
  --text: #3F4F57;
  --muted: #4A5A62;
  --amber: #A9561E;
  --amber-dark: #8C4515;
  --sage: #8FAE9B;
  --sage-light: #DCE7DF;
  --on-teal: #D7E3E6;

  --font-heading: "Manrope", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;

  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --container: 1200px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--teal-dark);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease;
}

.btn-primary { background: var(--amber); color: var(--white); }
.btn-primary:hover { background: var(--amber-dark); color: var(--white); }

.btn-outline { border-color: var(--teal); color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--white); }

/* ---------- Safety bar ---------- */
.safety-bar {
  background: var(--teal-dark);
  color: var(--sand);
  font-size: 15px;
}

.safety-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}

.quick-exit {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--sand);
  color: var(--teal-dark);
  font-weight: 600;
  text-decoration: none;
}
.quick-exit:hover { background: var(--white); color: var(--teal-dark); }

/* ---------- Header ---------- */
.site-header {
  background: var(--sand);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--teal);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
}

/* ---------- Main menu with dropdowns ---------- */
.site-header { position: relative; z-index: 50; } /* keeps dropdowns above the page and map */

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

.menu > li { position: relative; }

/* Top-level links and dropdown headings share one look */
.menu > li > a:not(.btn),
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.menu > li > a:not(.btn):hover,
.dropdown-toggle:hover,
.has-dropdown.is-open > .dropdown-toggle {
  background: #EFE7DB;
  color: var(--teal);
}

/* Current page */
.menu > li > a[aria-current="page"],
.has-dropdown.is-current > .dropdown-toggle,
.has-dropdown:has(a[aria-current="page"]) > .dropdown-toggle {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.chevron { transition: transform .2s ease; }
.dropdown-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* The dropdown panel */
.dropdown {
  display: none;
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(22, 58, 71, 0.14);
  z-index: 60;
}

/* Invisible bridge so the menu doesn't close as the mouse moves down to it */
.dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -10px;
  height: 10px;
}

.has-dropdown.is-open > .dropdown { display: block; }

.dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.dropdown a:hover,
.dropdown a:focus-visible { background: var(--sand); color: var(--teal); }
.dropdown a[aria-current="page"] { color: var(--teal); font-weight: 600; }

.menu-cta { margin-left: 10px; }
.menu-cta .btn { color: var(--white); padding: 10px 20px; }
.menu-cta .btn:hover { color: var(--white); }

/* "Menu" button – only shown on small screens */
.nav-toggle { display: none; }

/* Desktop: open dropdowns on hover too */
@media (min-width: 900px) and (hover: hover) {
  .has-dropdown:hover > .dropdown { display: block; }
}
/* Without JavaScript, keyboard users can still reach the dropdowns */
@media (min-width: 900px) {
  html:not(.js) .has-dropdown:focus-within > .dropdown { display: block; }
}

/* Small screens: collapsible stacked menu */
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 18px;
    border: 2px solid var(--teal);
    border-radius: var(--radius-pill);
    background: none;
    color: var(--teal);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }

  .nav-toggle-icon { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
  .nav-toggle-icon span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .main-nav { flex-basis: 100%; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: block; }

  .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .menu > li > a:not(.btn),
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 10px;
  }

  .dropdown {
    position: static;
    min-width: 0;
    margin: 0 0 6px 14px;
    padding: 4px 0 4px 10px;
    background: transparent;
    border: 0;
    border-left: 2px solid var(--sage-light);
    border-radius: 0;
    box-shadow: none;
  }
  .dropdown a { white-space: normal; }
  .dropdown::before { display: none; }
  html:not(.js) .dropdown { display: block; }

  .menu-cta { margin: 12px 0 6px; }
  .menu-cta .btn { width: 100%; }
}

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-block;
  background: var(--sage-light);
  color: var(--teal);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.section { padding-top: 88px; padding-bottom: 88px; }
.section-white { background: var(--white); }

.section-title { font-size: 34px; margin-bottom: 12px; }
.section-intro { color: var(--muted); max-width: 40em; margin-bottom: 40px; }

/* Grey-green box standing in for a real photo.
   Replace each one with <img src="..." alt="..."> when you have photos. */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--sage-light);
  color: #3F5A4A;
  font-size: 16px;
  border-radius: var(--radius-xl);
}

.photo {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

/* ---------- Home: hero ---------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 88px;
}

.hero-text { flex: 1 1 460px; min-width: 0; }
.hero-media { flex: 1 1 420px; min-width: 0; height: 440px; }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 20px;
  color: var(--text);
  max-width: 34em;
  margin-bottom: 32px;
}

.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

.trust-line { margin-top: 28px; font-size: 16px; color: var(--muted); }

/* ---------- Home: audience cards ---------- */
.card-row { display: flex; flex-wrap: wrap; gap: 20px; }

.audience-card {
  flex: 1 1 240px;
  display: block;
  padding: 28px;
  background: var(--sand);
  border-radius: var(--radius-md);
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s ease;
}
.audience-card:hover { transform: translateY(-3px); color: var(--ink); }
.audience-card h3 { font-size: 20px; color: var(--ink); margin: 16px 0 6px; }
.audience-card p { font-size: 16px; color: var(--muted); }

/* ---------- Home: programs ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}
.section-head .section-intro { margin-bottom: 0; }

.program-grid { display: flex; flex-wrap: wrap; gap: 24px; }

.program-card {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.program-card .photo-placeholder,
.program-card .photo {
  height: 180px;
  border-radius: 0;
  font-size: 15px;
}
.program-card .tone-sand { background: var(--sand-deep); color: #6A4A30; }
.program-card .tone-blue { background: #D6E2E6; color: #2E4C57; }

.program-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  padding: 28px;
}
.program-meta { font-size: 14px; font-weight: 600; color: var(--teal); }
.program-body h3 { font-size: 22px; }
.program-body p { font-size: 16px; color: var(--muted); flex-grow: 1; }
.text-link { font-weight: 600; }

/* ---------- Home: approach ---------- */
.approach { background: var(--teal); color: var(--on-teal); }
.approach .section-title { color: var(--white); }
.approach .section-intro { color: var(--on-teal); margin-bottom: 48px; }

.steps { display: flex; flex-wrap: wrap; gap: 32px; list-style: none; margin: 0; padding: 0; }
.step { flex: 1 1 280px; }
.step-number {
  width: 48px; height: 48px;
  border-radius: var(--radius-pill);
  background: var(--sage);
  color: var(--teal-dark);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { color: var(--white); font-size: 22px; margin: 18px 0 8px; }
.step p { font-size: 17px; }

/* ---------- Home: testimonial ---------- */
.testimonial {
  max-width: 900px;
  margin: 0 auto;
  padding: 96px var(--gutter);
  text-align: center;
}
.testimonial blockquote {
  margin: 20px 0 24px;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  font-weight: 600;
  color: var(--teal-dark);
}
.testimonial cite { font-style: normal; color: var(--muted); }

/* ---------- Call-to-action band ---------- */
.cta-wrap { padding-bottom: 96px; }
.cta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 56px 48px;
  background: var(--sand-deep);
  border-radius: 32px;
}
.cta-band > div { flex: 1 1 420px; }
.cta-band h2 { font-size: 32px; margin-bottom: 10px; }
.cta-band p { color: #4A4036; }

/* ---------- About: article + sidebar ---------- */
.page-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
  padding-top: 64px;
  padding-bottom: 96px;
}

.page-main { flex: 999 1 560px; min-width: 0; }

.page-main h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.page-main .photo-placeholder,
.page-main .photo { height: 400px; margin-bottom: 40px; }

.page-main .lead { font-size: 21px; color: #2F3E45; margin-bottom: 20px; }
.page-main h2 { font-size: 26px; margin: 40px 0 12px; }
.page-main p { color: var(--text); margin-bottom: 16px; }

.sidebar {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.side-card h2 { font-size: 20px; margin-bottom: 16px; }

.facts { margin: 0; display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
}
.value-list li { display: flex; gap: 10px; align-items: flex-start; }
.value-list svg { flex-shrink: 0; margin-top: 3px; }

.side-card-dark { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.side-card-dark h2 { color: var(--white); margin-bottom: 8px; }
.side-card-dark p { font-size: 16px; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dark); color: var(--on-teal); font-size: 16px; }

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  padding-top: 56px;
  padding-bottom: 40px;
}
.footer-brand { flex: 1 1 300px; }
.footer-brand .name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 10px;
}
.footer-brand p { max-width: 26em; }

.footer-nav { flex: 0 1 200px; display: flex; flex-direction: column; gap: 8px; }
.footer-nav a { color: var(--white); text-decoration: none; }
.footer-nav a:hover { color: var(--white); text-decoration: underline; }

.footer-help { flex: 1 1 280px; }
.footer-help strong { display: block; color: var(--white); margin-bottom: 8px; }

.footer-bottom {
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--teal-line);
  font-size: 14px;
}

/* ---------- Contact: map banner ---------- */
.map-banner {
  position: relative;
  height: 360px;
  background: var(--sage-light);
  border-bottom: 1px solid var(--border);
}
.map-banner iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.85);
}

/* ---------- Contact: form ---------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 32px;
}

.form-row { display: flex; flex-wrap: wrap; gap: 22px; }
.form-row .field { flex: 1 1 240px; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.field label {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.field .required { color: var(--amber); }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid #CFC4B5;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  min-height: 48px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 180px; resize: vertical; line-height: 1.5; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 78, 95, 0.18);
}

.form-note { font-size: 15px; color: var(--muted); }

.form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.form-actions .btn { font-size: 17px; cursor: pointer; font-family: inherit; }

/* Honeypot field: hidden from people, visible to spam bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Contact: sidebar details ---------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
}
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list svg { flex-shrink: 0; margin-top: 3px; }
.contact-list .label { display: block; color: var(--muted); font-size: 14px; }

.side-card-alert { background: var(--sand-deep); border-color: var(--sand-deep); }
.side-card-alert p { font-size: 16px; color: #4A4036; }

/* ---------- Thank-you / error message ---------- */
.message-panel {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px var(--gutter);
  text-align: center;
}
.message-icon {
  width: 72px; height: 72px;
  margin: 0 auto 24px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--sage-light);
  color: var(--teal);
}
.message-panel.is-error .message-icon { background: var(--sand-deep); color: var(--amber); }
.message-panel h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 16px; }
.message-panel p { font-size: 19px; color: var(--text); margin-bottom: 12px; }
.message-panel .button-row { justify-content: center; margin-top: 32px; }

.error-list {
  text-align: left;
  display: inline-block;
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--text);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .hero { padding-top: 48px; padding-bottom: 64px; gap: 36px; }
  .hero-media { height: 280px; }
  .page-main .photo-placeholder,
  .page-main .photo { height: 260px; }
  .cta-band { padding: 40px 28px; }
  .map-banner { height: 240px; }
  .message-panel { padding-top: 64px; padding-bottom: 64px; }
  .section-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Books page ---------- */

.page-intro {
  padding-top: 64px;
  padding-bottom: 24px;
}
.page-intro h1,
.page-intro .lead { max-width: 860px; }
.page-intro h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.page-intro .lead { font-size: 20px; color: var(--text); }

.book-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 32px;
  padding-bottom: 96px;
}

.book {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
}

/* Every second book puts its cover on the right, for a little rhythm */
.book:nth-child(even) { flex-direction: row-reverse; }

.book-media { flex: 0 0 280px; max-width: 100%; }

.book-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow:
    0 2px 4px rgba(22, 58, 71, 0.10),
    0 18px 40px rgba(22, 58, 71, 0.20);
}

.book-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--sage-light);
  color: #3F5A4A;
  font-size: 15px;
}
.book-cover-placeholder.tone-sand { background: var(--sand-deep); color: #6A4A30; }
.book-cover-placeholder.tone-blue { background: #D6E2E6; color: #2E4C57; }

.book-body { flex: 1 1 380px; min-width: 0; }

.book-tag {
  display: inline-block;
  background: var(--sage-light);
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.book-body h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 6px;
}
.book-subtitle {
  font-size: 19px;
  color: var(--text);
  margin-bottom: 8px;
}
.book-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 20px;
}
.book-body > p:not([class]) { color: var(--text); margin-bottom: 18px; }

.book-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 17px;
}
.book-points li {
  position: relative;
  padding-left: 26px;
}
.book-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}

.book-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 0 0 28px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.book-details dt { color: var(--muted); }
.book-details dd { margin: 0; font-weight: 600; }

@media (max-width: 760px) {
  .book,
  .book:nth-child(even) { flex-direction: column; padding: 28px; gap: 28px; }
  .book-media { flex: none; width: 200px; margin: 0 auto; }
  .page-intro { padding-top: 48px; }
}

/* ---------- Blog article ---------- */

.article { max-width: 770px; }

.article-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.article-back:hover { text-decoration: underline; }

.article-header h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Article image: 770 × 512, scales down on smaller screens */
.article-figure { margin: 0 0 40px; }
.article-figure img,
.article-image-placeholder {
  display: block;
  width: 100%;
  max-width: 770px;
  height: auto;
  aspect-ratio: 770 / 512;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.article-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-light);
  color: #3F5A4A;
  font-size: 16px;
}
.article-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* Readable article text */
.article-body { font-size: 18px; line-height: 1.75; color: var(--ink); }
.article-body p { margin: 0 0 22px; color: var(--ink); }
.article-body .lead { font-size: 21px; line-height: 1.6; color: #2F3E45; }
.article-body h2 { font-size: 28px; margin: 48px 0 16px; }
.article-body h3 { font-size: 22px; margin: 36px 0 12px; }
.article-body ul,
.article-body ol { margin: 0 0 24px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--teal); }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }

.article-body blockquote {
  margin: 36px 0;
  padding: 28px 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--teal-dark);
}
.article-body blockquote p { margin: 0; color: inherit; }

/* Author box */
.article-author {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 48px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 16px;
}
.article-author img {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  background: var(--sage-light);
}
.article-author p { margin: 0; color: var(--text); }
.article-author-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--teal-dark) !important;
  margin-bottom: 4px !important;
}

/* Call to action under the article */
.article-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 28px;
  background: var(--sand-deep);
  border-radius: var(--radius-lg);
}
.article-cta p { flex: 1 1 320px; margin: 0; color: #4A4036; }

/* Photo inside a sidebar card */
.side-photo { margin-bottom: 16px; border-radius: var(--radius-md); }

@media (max-width: 640px) {
  .article-body { font-size: 17px; }
  .article-body h2 { font-size: 24px; }
  .article-body blockquote { padding: 22px; font-size: 19px; }
  .article-author { flex-direction: column; }
}

/* ---------- Search box & results ----------
   Paste this at the end of /css/style.css */

.search-card h2 { margin-bottom: 12px; }
.search-card label { cursor: pointer; }

.search-form {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #CFC4B5;
  border-radius: var(--radius-pill);
  background: var(--white);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-form:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 78, 95, 0.18);
}

.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 10px 6px 10px 18px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;          /* 16px stops iPhones zooming in on the box */
  color: var(--ink);
}
.search-form input:focus { outline: none; }
.search-form input::placeholder { color: #7A868C; }
.search-form input::-webkit-search-cancel-button { cursor: pointer; }

.search-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  margin: 4px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--teal);
  color: var(--white);
  cursor: pointer;
  transition: background-color .15s ease;
}
.search-button:hover { background: var(--teal-dark); }
.search-button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* Results page */
.search-count { color: var(--muted); margin: -8px 0 28px; }

.search-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }

.search-result {
  padding: 24px 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.search-result h2 { font-size: 21px; margin: 0 0 4px; }
.search-result h2 a { text-decoration: none; }
.search-result h2 a:hover { text-decoration: underline; }
.search-url { font-size: 14px; color: var(--muted); margin: 0 0 10px !important; word-break: break-all; }
.search-result p { margin: 0; color: var(--text); font-size: 16px; }
.search-result mark { background: #F3E1C7; color: inherit; padding: 0 2px; border-radius: 3px; }

/* ---------- Horizontal concertina ----------
   Paste this at the end of /css/style.css
   Works with /js/concertina.js                                   */

.concertina-wrap { container-type: inline-size; margin: 32px 0 40px; }

.concertina {
  --strip: 76px;              /* width of a closed panel */
  --height: 440px;            /* height of the concertina */
  --speed: .45s;

  display: flex;
  gap: 8px;
  height: var(--height);
}

.concertina-panel {
  position: relative;
  display: flex;
  flex: 0 0 var(--strip);
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--teal);
  color: var(--white);
  transition: flex var(--speed) ease;
}
.concertina-panel.is-open { flex: 1 1 0; }

/* Colour for each panel (closed strips get gradually darker) */
.concertina-panel:nth-child(4n+1) { background: var(--teal); }
.concertina-panel:nth-child(4n+2) { background: #2A5F6F; }
.concertina-panel:nth-child(4n+3) { background: #34697A; }
.concertina-panel:nth-child(4n+4) { background: var(--teal-dark); }

/* Optional photo behind a panel: style="--panel-image: url('/img/photo.jpg')" */
.concertina-panel[style*="--panel-image"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--panel-image) center / cover no-repeat;
  opacity: .22;
  transition: opacity var(--speed) ease;
  pointer-events: none;
}
.concertina-panel.is-open[style*="--panel-image"]::before { opacity: .14; }

/* ---- The strip / tab (a real button) ---- */
/* (".concertina" in front makes these win over the site's general heading rules) */
.concertina .concertina-heading {
  margin: 0;
  flex: 0 0 var(--strip);
  display: flex;
  position: relative;
  z-index: 1;
  font-size: inherit;
  color: var(--white);
}

.concertina .concertina-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.concertina-tab:hover { background: rgba(255, 255, 255, .06); }
.concertina-tab:focus-visible { outline: 3px solid var(--amber); outline-offset: -6px; border-radius: var(--radius-lg); }

.concertina-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: var(--sage);
}

.concertina-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .01em;
  white-space: nowrap;
}

.concertina-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, .45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--speed) ease;
}
.concertina-panel.is-open .concertina-icon { transform: rotate(180deg); }

/* ---- The content ---- */
.concertina-content {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  padding: 34px 36px 34px 8px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.concertina-panel.is-open .concertina-content {
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease .2s, visibility 0s;
}

/* Keep the text from re-wrapping while the panel animates open */
.concertina-inner { min-width: 300px; }

.concertina .concertina-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.5rem, 3cqi, 2rem);
  line-height: 1.15;
  color: var(--white);
  margin: 0 0 14px;
}
.concertina .concertina-content p:not(.concertina-title) { margin: 0 0 16px; color: var(--on-teal); font-size: 17px; line-height: 1.6; }

.concertina-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
}
.concertina-points li { position: relative; padding-left: 26px; color: var(--white); }
.concertina-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .5em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--sage);
  border-bottom: 2px solid var(--sage);
  transform: rotate(-45deg);
}

.concertina-content .btn { margin-top: 4px; }

/* ---- Narrow spaces (phones, or a narrow column): stacked accordion ---- */
@container (max-width: 620px) {
  .concertina { flex-direction: column; height: auto; }
  .concertina-panel,
  .concertina-panel.is-open { flex: none; flex-direction: column; }
  .concertina .concertina-heading { flex: none; }
  .concertina .concertina-tab {
    flex-direction: row;
    gap: 14px;
    padding: 18px 20px;
    min-height: 64px;
  }
  .concertina-label {
    writing-mode: horizontal-tb;
    transform: none;
    white-space: normal;
    flex: 1 1 auto;
    font-size: 18px;
  }
  .concertina-icon { transform: rotate(-90deg); }
  .concertina-panel.is-open .concertina-icon { transform: rotate(90deg); }
  .concertina-content { display: none; padding: 0 22px 26px; overflow: visible; }
  .concertina-panel.is-open .concertina-content { display: block; }
  .concertina-inner { min-width: 0; }
  .concertina .concertina-title { display: none; }   /* the bar already shows the title */
}

/* ---- Without JavaScript: show everything, stacked ---- */
html:not(.js) .concertina { flex-direction: column; height: auto; }
html:not(.js) .concertina-panel { flex: none; flex-direction: column; }
html:not(.js) .concertina-label { writing-mode: horizontal-tb; transform: none; }
html:not(.js) .concertina .concertina-tab { flex-direction: row; gap: 14px; padding: 18px 20px; }
html:not(.js) .concertina-content { opacity: 1; visibility: visible; padding: 0 22px 26px; }
html:not(.js) .concertina-icon { display: none; }

@media (prefers-reduced-motion: reduce) {
  .concertina-panel, .concertina-content, .concertina-icon { transition: none !important; }
}