/* =============================================================
   Components — product-UI language
   Soft cards, pill badges, glow hero, stat tiles, rails, lists.
   ============================================================= */

/* ============ HERO ============ */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(1.75rem, 1.1rem + 3vw, 3.5rem));
  padding-bottom: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(15, 66, 107, 0.16), transparent 62%),
    radial-gradient(760px 460px at 8% 4%, rgba(213, 131, 94, 0.13), transparent 60%),
    linear-gradient(180deg, #eef2f7 0%, var(--canvas) 68%);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  align-items: center;
  gap: clamp(2rem, 1.2rem + 3.5vw, 4.5rem);
}
/* The tilted photo stack is absolutely positioned, so give it only the
   height it needs — otherwise it pads the whole hero out. */
.hero__visual { align-self: stretch; }
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 1.5rem + 3.4vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-top: 1.2rem;
}
.hero__title .l2 { color: var(--navy); }
.hero__title .l3 { color: var(--terracotta); }
.hero__lede { margin-top: 1.4rem; max-width: 46ch; }

/* Pill cluster under the hero copy */
.hero__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }

/* Stacked, tilted photo composition on the right */
.hero__visual { position: relative; min-height: clamp(300px, 34vw, 430px); }
.hero__card {
  position: absolute;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-lg);
}
.hero__card img { width: 100%; height: 100%; object-fit: cover; }
.hero__card--a { inset: 0 16% 22% 0; z-index: 3; transform: rotate(-2deg); }
.hero__card--b { inset: 20% 0 4% 26%; z-index: 2; transform: rotate(2.5deg); }
.hero__card--c { inset: 46% 32% 0 8%; z-index: 1; transform: rotate(-4deg); display: none; }
@media (min-width: 1100px) { .hero__card--c { display: block; } }
@media (max-width: 940px) {
  .hero__visual { min-height: clamp(260px, 62vw, 400px); }
  .hero__card--a { inset: 0 20% 26% 0; }
  .hero__card--b { inset: 24% 0 2% 30%; }
}
.js .hero__card { opacity: 0; transform: translateY(26px) rotate(0deg); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .hero__card.is-in { opacity: 1; }
.js .hero__card--a.is-in { transform: rotate(-2deg); }
.js .hero__card--b.is-in { transform: rotate(2.5deg); transition-delay: .1s; }
.js .hero__card--c.is-in { transform: rotate(-4deg); transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .js .hero__card { opacity: 1 !important; }
  .js .hero__card--a { transform: rotate(-2deg) !important; }
  .js .hero__card--b { transform: rotate(2.5deg) !important; }
  .js .hero__card--c { transform: rotate(-4deg) !important; }
}

/* Rotating slide caption + controls beneath the visual */
.hero__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}
@media (max-width: 940px) { .hero__controls { justify-content: flex-start; } }
.hero__dots { display: flex; gap: 0.4rem; }
.hero__dot {
  width: 30px; height: 4px;
  padding: 8px 0;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.hero__dot::before {
  content: '';
  position: absolute; inset: 8px 0;
  background: var(--line-2);
  border-radius: var(--r-pill);
  transition: background var(--dur) var(--ease);
}
.hero__dot[aria-current='true']::before { background: var(--navy); }
.hero__dot:hover::before { background: var(--navy-600); }
.hero__arrows { display: flex; gap: 0.4rem; margin-left: auto; }
.hero__arrow {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--navy); cursor: pointer;
  box-shadow: var(--sh-xs);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.hero__arrow:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.hero__arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ============ STAT TILES ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.75rem, 0.5rem + 0.8vw, 1.15rem);
}
@media (max-width: 1000px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  text-align: center;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.stat__value {
  display: flex; align-items: baseline; justify-content: center; gap: 0.02em;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 1.1rem + 1.9vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.stat__affix { color: var(--terracotta); }
.stat__label {
  margin-top: 0.7rem;
  font-size: var(--fs-pill);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.45;
}
.stat--dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.stat--dark .stat__value { color: #fff; }
.stat--dark .stat__label { color: rgba(255,255,255,.62); }
.stat--dark:hover { background: rgba(255,255,255,.09); }
.stats-grid .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 561px) { .stats-grid .stat:last-child:nth-child(odd) { grid-column: auto; } }

/* ============ SPLIT FEATURE ============ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.75rem, 1.1rem + 3vw, 4rem);
}
.split--flip .split__media { order: -1; }
/* Consecutive split blocks need real breathing room between them. */
.split + .split { margin-top: clamp(4.5rem, 3rem + 6vw, 9rem); }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}
.split__media .media { border-radius: var(--r-lg); box-shadow: var(--sh-md); }

/* Small feature list with check dots */
.flist { display: grid; gap: 0.7rem; margin-top: 1.4rem; }
.flist li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-muted); font-size: var(--fs-small); }
.flist .dot {
  flex: none; width: 18px; height: 18px; margin-top: 0.28rem;
  border-radius: 50%;
  background: var(--navy-tint); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
}
.flist .dot svg { width: 10px; height: 10px; }
.on-dark .flist li { color: rgba(255,255,255,.76); }
.on-dark .flist .dot { background: rgba(255,255,255,.14); color: #fff; }

/* ============ PROPERTY RAIL ============ */
.rail-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1.25rem 2rem;
  margin-bottom: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
}
.rail-nav { display: flex; gap: 0.45rem; }
.rail-btn {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--navy); cursor: pointer;
  box-shadow: var(--sh-xs);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rail-btn:hover:not(:disabled) { background: var(--navy); color: #fff; transform: translateY(-1px); }
.rail-btn:disabled { opacity: 0.35; cursor: default; }
.rail-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.on-dark .rail-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.on-dark .rail-btn:hover:not(:disabled) { background: #fff; color: var(--navy); }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(250px, 27vw, 340px);
  gap: clamp(0.85rem, 0.6rem + 1vw, 1.35rem);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-block: 0.4rem 1.25rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  cursor: grab;
  /* Scrollbar hidden — the rail advances on its own and has arrows. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { width: 0; height: 0; display: none; }
.rail.is-dragging { cursor: grabbing; scroll-behavior: auto; }

/* A continuously-looping rail must not snap, or it stutters. */
.rail--loop { scroll-snap-type: none; }
.rail:not(.rail--loop) { scroll-snap-type: x mandatory; }
.rail:not(.rail--loop) > * { scroll-snap-align: start; }

/* Soft fade at both edges so cards enter and leave gracefully. */
.rail-wrap { position: relative; }
.rail-wrap::before,
.rail-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 1.25rem;
  width: clamp(24px, 5vw, 80px);
  pointer-events: none; z-index: 2;
}
.rail-wrap::before { left: calc(var(--gutter) * -1); background: linear-gradient(to right, var(--surface), transparent); }
.rail-wrap::after { right: calc(var(--gutter) * -1); background: linear-gradient(to left, var(--surface), transparent); }
.bg-canvas .rail-wrap::before { background: linear-gradient(to right, var(--canvas), transparent); }
.bg-canvas .rail-wrap::after { background: linear-gradient(to left, var(--canvas), transparent); }

@media (prefers-reduced-motion: reduce) { .rail { scroll-behavior: auto; } }

/* Property plate = media card */
.plate {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.plate:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.plate .media { border-radius: 0; aspect-ratio: 4 / 3; }
.plate__body { padding: 1.05rem 1.15rem 1.2rem; }
.plate__name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.plate__loc {
  margin-top: 0.3rem;
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  display: flex; align-items: center; gap: 0.35em;
}
.plate__loc svg { width: 12px; height: 12px; flex: none; opacity: .75; }
a.plate:hover .plate__name { color: var(--navy); }

/* ============ NEWS LIST ============ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: clamp(1.4rem, 1rem + 1.6vw, 2.25rem); }

.post {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.post:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.post .media { border-radius: 0; aspect-ratio: 16 / 10; }
.post__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.post__title {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600; line-height: 1.38; color: var(--ink);
}
.post:hover .post__title { color: var(--navy); }
.post__meta { font-size: var(--fs-tiny); color: var(--ink-faint); }
.post__foot { margin-top: auto; padding-top: 0.5rem; }

/* Compact list variant (archives) */
.rows { display: grid; gap: 0.75rem; }
.row-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.85rem 1.1rem 0.85rem 0.85rem;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.row-item:hover { transform: translateX(3px); box-shadow: var(--sh-sm); border-color: var(--line-2); }
.row-item__thumb { width: 96px; aspect-ratio: 3/2; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.row-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item__title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.row-item__meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: .35rem; font-size: var(--fs-tiny); color: var(--ink-faint); }
.row-item__go { color: var(--navy); font-size: var(--fs-tiny); font-weight: 600; white-space: nowrap; }
@media (max-width: 620px) {
  .row-item { grid-template-columns: 72px 1fr; }
  .row-item__thumb { width: 72px; }
  .row-item__go { display: none; }
}

/* ============ PAGE HEADER ============ */
.page-head {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(2.25rem, 1.5rem + 3vw, 4rem));
  padding-bottom: clamp(2.25rem, 1.5rem + 3vw, 4rem);
  background:
    radial-gradient(900px 500px at 82% -12%, rgba(15, 66, 107, 0.15), transparent 60%),
    radial-gradient(620px 380px at 6% 0%, rgba(213, 131, 94, 0.12), transparent 58%),
    linear-gradient(180deg, #eef2f7 0%, var(--canvas) 74%);
  overflow: hidden;
}
.page-head__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem,1rem+3vw,3.5rem); align-items: center; }
@media (max-width: 880px) { .page-head__grid { grid-template-columns: 1fr; } }
.page-head h1 { margin-top: 1rem; max-width: 20ch; }
.page-head .lede { margin-top: 1.1rem; }
.page-head__media .media { border-radius: var(--r-lg); box-shadow: var(--sh-lg); aspect-ratio: 4/3; }

.crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-size: var(--fs-tiny); color: var(--ink-faint);
}
.crumb a:hover { color: var(--navy); }
.crumb .sep { opacity: .5; }

/* ============ TIMELINE (uniform cards) ============ */
/* Every year is the same card: a fixed-height image band on top (a
   shared brand panel when that year has no photograph), then a year
   heading and its bullets. Equal heights across each row. */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
}
@media (max-width: 1000px) { .tl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .tl-grid { grid-template-columns: 1fr; } }

.tl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.tl-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line-2); }

/* Image band — identical height on every card */
.tl-card__band {
  position: relative;
  height: 172px;
  background: var(--surface-2);
  overflow: hidden;
  flex: none;
}
.tl-card__band img { width: 100%; height: 100%; object-fit: cover; }
.tl-card__body {
  padding: clamp(1.15rem, 1rem + .6vw, 1.6rem);
  display: flex; flex-direction: column; gap: .7rem; flex: 1;
}
.tl-year {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.02rem + .38vw, 1.32rem);
  font-weight: 700; color: var(--navy);
  letter-spacing: -.015em; line-height: 1.25;
}
.tl-card__body > p {
  color: var(--ink-muted); font-size: var(--fs-small);
  max-width: none; margin: 0;
}
.tl-list { display: grid; gap: .5rem; margin: 0; }
.tl-list li {
  display: flex; gap: .6rem; align-items: flex-start;
  color: var(--ink-muted); font-size: var(--fs-small); line-height: 1.58;
}
.tl-list .dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--terracotta); margin-top: .6rem; }
.tl-list strong { color: var(--ink); font-weight: 600; }

.tl-badge { height: 48px; width: auto; border-radius: 8px; margin-top: auto; padding-top: .6rem; }

/* ============ TEAM ============ */
.team-filter {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center;
  margin-bottom: clamp(2.5rem, 1.8rem + 3vw, 4rem);
}
.team-filter button {
  padding: .5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-tiny); font-weight: 600;
  color: var(--ink-muted); cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.team-filter button:hover { border-color: var(--navy); color: var(--navy); }
.team-filter button[aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: var(--sh-navy); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
}
@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .team-grid { grid-template-columns: 1fr; } }
.member {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.member:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
/* Headshots are cut-out PNGs on transparent backgrounds and vary wildly
   in size. Pin the frame to a fixed height and let the portrait sit on
   a soft panel, bottom-aligned, so every card matches. */
.member__photo {
  position: relative;
  height: 280px;
  flex: none;
  overflow: hidden;
  background: linear-gradient(180deg, #eaeff5 0%, #f4f6f9 100%);
}
.member__photo img {
  position: absolute;
  inset: 12px 12px 0;
  width: calc(100% - 24px);
  height: calc(100% - 12px);
  object-fit: contain;
  object-position: bottom center;
  transition: transform .7s var(--ease-out);
}
.member:hover .member__photo img { transform: scale(1.035); }
.member__body { padding: 1.05rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.member__name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.member__title { font-size: var(--fs-tiny); color: var(--ink-muted); line-height: 1.5; }
.member__btn {
  margin-top: auto; padding-top: .8rem;
  background: none; border: 0; text-align: left;
  font-size: var(--fs-tiny); font-weight: 600; color: var(--navy);
  cursor: pointer; display: inline-flex; align-items: center; gap: .35em;
  transition: gap var(--dur) var(--ease);
}
.member__btn:hover { gap: .6em; }

.bio-modal {
  border: 0; padding: 0;
  width: min(680px, calc(100vw - 2rem));
  max-height: min(86vh, 860px);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.bio-modal::backdrop { background: rgba(8, 20, 34, .66); backdrop-filter: blur(4px); }

.bio-modal__inner {
  display: block;
  padding: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  overflow-y: auto;
  max-height: min(86vh, 860px);
}

/* Header row: framed thumbnail + name/role */
.bio-head {
  display: flex; align-items: center; gap: 1.1rem;
  padding-right: 2.5rem;
}
.bio-head__photo {
  flex: none;
  width: 88px; height: 88px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(180deg, #eaeff5 0%, #f4f6f9 100%);
  border: 2px solid var(--terracotta);
  padding: 2px;
}
.bio-head__photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  border-radius: 6px;
}
.bio-head__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem);
  font-weight: 700; color: var(--ink); line-height: 1.2;
}
.bio-head__role {
  margin-top: .3rem;
  font-size: var(--fs-small); font-weight: 600;
  color: var(--terracotta-dark); line-height: 1.4;
}
.bio-head__dept {
  font-size: var(--fs-pill); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .3rem;
}

.bio-rule { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }

.bio-body p { font-size: var(--fs-small); color: var(--ink-muted); max-width: none; }
.bio-body p + p { margin-top: .9rem; }

/* Contact rows */
.bio-contact { display: grid; gap: .6rem; }
.bio-contact a, .bio-contact span.row {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: var(--fs-small); color: var(--navy); font-weight: 600;
}
.bio-contact a:hover { color: var(--terracotta-dark); }
.bio-contact svg { width: 16px; height: 16px; flex: none; color: var(--terracotta); }

.bio-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.bio-actions .btn { flex: 1 1 180px; }

.bio-modal__close {
  position: absolute; top: .9rem; right: .9rem;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 50%; cursor: pointer;
  font-size: 1.05rem; line-height: 1; color: var(--ink-muted);
  z-index: 3;
}
.bio-modal__close:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

@media (max-width: 520px) {
  .bio-head { flex-direction: column; align-items: flex-start; padding-right: 2.5rem; }
  .bio-actions .btn { flex: 1 1 100%; }
}

/* ============ ACCORDION ============ */
.accordion { display: grid; gap: .7rem; }
.acc-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.acc-item[data-open='true'] { border-color: var(--line-2); box-shadow: var(--sh-sm); }
.acc-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  width: 100%; padding: 1.1rem 1.25rem;
  background: none; border: 0; text-align: left;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--ink); cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.acc-trigger:hover { color: var(--navy); }
.acc-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy-tint); position: relative; }
.acc-icon::before, .acc-icon::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  background: var(--navy);
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.acc-icon::before { width: 10px; height: 1.5px; }
.acc-icon::after { width: 1.5px; height: 10px; }
.acc-trigger[aria-expanded='true'] .acc-icon::after { transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease); }
.acc-item[data-open='true'] .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 1.25rem 1.25rem; color: var(--ink-muted); font-size: var(--fs-small); max-width: none; }

/* ============ FORMS ============ */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

.field { display: grid; gap: .4rem; }
.field > label { font-size: var(--fs-tiny); font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: .97rem;
  color: var(--ink);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15, 66, 107, 0.13);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #c2452e; }

.form--on-dark .field > label { color: rgba(255,255,255,.76); }
.form--on-dark .field input,
.form--on-dark .field select,
.form--on-dark .field textarea {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}
.form--on-dark .field input::placeholder,
.form--on-dark .field textarea::placeholder { color: rgba(255,255,255,.48); }
.form--on-dark .field input:focus,
.form--on-dark .field select:focus,
.form--on-dark .field textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(213,131,94,.22);
}
.form--on-dark .field select option { color: var(--ink); }

.form-note { font-size: var(--fs-tiny); line-height: 1.6; color: var(--ink-muted); max-width: 60ch; }
.form--on-dark .form-note { color: rgba(255,255,255,.62); }

.form-status { padding: .95rem 1.15rem; border-radius: var(--r-sm); font-size: var(--fs-small); border: 1px solid; }
.form-status[hidden] { display: none; }
.form-status--ok { background: rgba(52,160,110,.1); border-color: rgba(52,160,110,.35); color: #24704f; }
.form-status--err { background: rgba(194,69,46,.09); border-color: rgba(194,69,46,.3); color: #93301f; }
.form--on-dark .form-status--ok { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: #cdebda; }
.form--on-dark .form-status--err { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2); color: #f6d2c9; }
.form--on-dark .form-status a { color: inherit; text-decoration: underline; }

/* ============ PROSE ============ */
.prose { max-width: var(--shell-text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.4rem; margin-top: 2.4em; }
.prose h3 { font-size: 1.12rem; margin-top: 1.9em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { color: var(--ink-muted); max-width: none; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--terracotta-dark); }
.prose ul { display: grid; gap: .5rem; padding-left: 1.2rem; list-style: disc; }
.prose li { color: var(--ink-muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.4em; }
.prose blockquote {
  border-left: 3px solid var(--terracotta);
  padding: .3rem 0 .3rem 1.3rem;
  font-family: var(--font-display); font-size: 1.1rem; color: var(--ink);
}

/* Legal doc card wrapper */
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 1.1rem + 2vw, 3rem);
}

/* ============ EMBEDS ============ */
.embed {
  position: relative; width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.embed--16x9 { aspect-ratio: 16 / 9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed--tall { min-height: 780px; }
.embed--tall iframe { position: static; height: 780px; }
.embed-note { margin-top: .85rem; font-size: var(--fs-tiny); color: var(--ink-faint); }

/* ============ FACTS ============ */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.facts > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.1rem 1.15rem;
}
.facts dt { font-size: var(--fs-pill); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .4rem; }
.facts dd { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--navy); line-height: 1.2; }

/* ============ MISC ============ */
.back-link {
  display: inline-flex; align-items: center; gap: .45em;
  font-size: var(--fs-tiny); font-weight: 600; color: var(--ink-muted);
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.back-link:hover { color: var(--navy); gap: .7em; }

.filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  justify-content: center;
  margin-bottom: clamp(2.5rem, 1.8rem + 3vw, 4rem);
}
.load-more { display: flex; justify-content: center; margin-top: 2.5rem; }
.empty-note { padding: 3rem 0; text-align: center; color: var(--ink-muted); }

/* CTA banner */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--r-xl);
  padding: clamp(2rem, 1.4rem + 3vw, 3.75rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute; inset: -40% -10% auto auto;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(213,131,94,.28), transparent 68%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; max-width: 22ch; margin-inline: auto; }
.cta-band p { color: rgba(255,255,255,.8); margin-inline: auto; margin-top: .9rem; }

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--navy), var(--terracotta));
  z-index: 1000; pointer-events: none;
}

/* ============ PILLAR CARD (image + overlapping icon tile) ============ */
.pcard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--line-2); }
.pcard__media { display: block; }
.pcard__media .media { border-radius: 0; }

.pcard__body {
  position: relative;
  padding: clamp(1.35rem, 1.1rem + .9vw, 1.75rem);
  display: flex; flex-direction: column; gap: .6rem; flex: 1;
}
/* Icon tile sits half over the image edge, on a white ring so it
   never looks like it is colliding with the photo. */
.pcard__tile {
  position: absolute;
  top: 0; left: clamp(1.35rem, 1.1rem + .9vw, 1.75rem);
  transform: translateY(-50%);
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 0 0 5px var(--surface), var(--sh-sm);
}
.pcard__tile svg { width: 20px; height: 20px; }
.pcard__body > h3 { margin-top: 1.35rem; }
.pcard__body p { color: var(--ink-muted); font-size: var(--fs-small); max-width: none; }
.pcard__foot { margin-top: auto; padding-top: .9rem; }
.pcard:hover h3 a { color: var(--navy); }

/* ============ NEWS GRID — fixed 3 across ============ */
.news-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .news-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid--3 { grid-template-columns: 1fr; } }
/* Keep every card the same height so rows line up */
.news-grid--3 .post__title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ CONTACT PANEL ============ */
.contact-panel {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-md);
}
@media (max-width: 900px) { .contact-panel { grid-template-columns: 1fr; } }

.contact-panel__aside {
  position: relative;
  padding: clamp(1.75rem, 1.3rem + 2.2vw, 3rem);
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  overflow: hidden;
}
.contact-panel__aside::before {
  content: '';
  position: absolute; inset: auto -25% -35% auto;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(213,131,94,.3), transparent 70%);
  pointer-events: none;
}
.contact-panel__aside > * { position: relative; }

.contact-list { display: grid; gap: 1.1rem; margin-top: 2rem; }
.contact-list li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-list__tile {
  flex: none;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
}
.contact-list__tile svg { width: 17px; height: 17px; }
.contact-list__k {
  display: block;
  font-size: var(--fs-pill); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: .15rem;
}
.contact-list__v { display: block; color: #fff; font-size: var(--fs-small); line-height: 1.5; }
a.contact-list__v { text-decoration: underline; text-underline-offset: 3px; }
a.contact-list__v:hover { color: var(--terracotta); }

.contact-panel__form { padding: clamp(1.75rem, 1.3rem + 2.2vw, 3rem); }

/* ============ AWARD CALLOUT ============ */
.award {
  display: flex; align-items: center; gap: clamp(1rem, .8rem + 1vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--terracotta);
  border-radius: var(--r-lg);
  padding: clamp(1.15rem, 1rem + .7vw, 1.75rem);
  max-width: 900px; margin-inline: auto;
}
.award img { flex: none; width: 76px; height: auto; border-radius: 8px; }
.award p {
  margin: 0; max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1rem, .95rem + .4vw, 1.2rem);
  font-weight: 600; color: var(--ink); line-height: 1.4;
}
@media (max-width: 560px) { .award { flex-direction: column; text-align: center; } }

/* ============ TERMS TABLE ============ */
.terms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  max-width: 980px; margin-inline: auto;
}
@media (max-width: 720px) { .terms { grid-template-columns: 1fr; } }
.terms__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
}
.terms__row dt {
  font-size: var(--fs-pill); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); flex: none;
}
.terms__row dd {
  margin: 0; text-align: right;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 600; color: var(--navy);
}

/* ============ PAGE-HEAD REFINEMENTS ============ */
.page-head .cta-row { margin-top: 1.5rem; }
.page-head .lede p { margin: 0; max-width: none; }
.page-head .lede p + p { margin-top: .85rem; }
.page-head .lede a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.page-head .lede a:hover { color: var(--terracotta-dark); }

/* ============ PAGINATION ============ */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .4rem;
  margin-top: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);
}
.pager__btn {
  min-width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 .85rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font-size: var(--fs-tiny); font-weight: 600;
  color: var(--ink-2); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.pager__btn:hover:not(:disabled):not([aria-current='true']) {
  border-color: var(--navy); color: var(--navy); transform: translateY(-1px);
}
.pager__btn[aria-current='true'] {
  background: var(--navy); border-color: var(--navy); color: #fff;
  box-shadow: var(--sh-navy);
}
.pager__btn:disabled { opacity: .35; cursor: default; }
.pager__btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.pager__gap { padding: 0 .3rem; color: var(--ink-faint); }
.pager__status {
  width: 100%; text-align: center;
  margin-top: .9rem;
  font-size: var(--fs-tiny); color: var(--ink-faint);
}

/* ============ COMMUNITY SEARCH ============ */
.comm-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-block: 1px solid var(--line);
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.comm-search {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  padding: .1rem .5rem .1rem 1rem;
  min-width: min(300px, 100%);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.comm-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15,66,107,.12); }
.comm-search svg { width: 16px; height: 16px; flex: none; color: var(--ink-faint); }
.comm-search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  padding: .7rem .5rem .7rem 0;
  font-size: var(--fs-small);
}
.comm-price {
  display: flex; align-items: baseline; gap: .45rem;
  margin: 0; font-size: var(--fs-tiny);
}
.comm-price span { color: var(--ink-faint); }
.comm-price strong {
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700; color: var(--navy);
}
@media (max-width: 720px) {
  .comm-bar { flex-direction: column; align-items: stretch; }
  .comm-search { min-width: 100%; }
}

/* ============ COMMUNITY SPLIT (map + list) ============ */
.comm-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
@media (max-width: 960px) { .comm-split { grid-template-columns: 1fr; } }

/* Map panel */
.comm-map {
  position: relative;
  background: #a9c7e2;
  min-height: 560px;
}
.comm-map__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comm-map__pins { position: absolute; inset: 0; }
.comm-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--navy-deep);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: .68rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.comm-pin:hover, .comm-pin[aria-pressed='true'] {
  background: var(--terracotta);
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 3;
}
@media (max-width: 960px) { .comm-map { min-height: 340px; } }

/* Scrolling list panel */
.comm-list {
  max-height: 560px;
  overflow-y: auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-content: start;
  background: var(--canvas);
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.comm-list::-webkit-scrollbar { width: 8px; }
.comm-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--r-pill); }
@media (max-width: 1200px) { .comm-list { grid-template-columns: 1fr; } }
@media (max-width: 960px)  { .comm-list { max-height: 620px; } }

/* One community tile */
.comm-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.comm-card:hover, .comm-card.is-active {
  border-color: var(--terracotta);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}
.comm-card__num {
  position: absolute; top: .6rem; left: .6rem; z-index: 2;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff; font-size: .7rem; font-weight: 700;
}
.comm-card__head { padding: 1.4rem .9rem .6rem; text-align: center; }
.comm-card__name {
  font-family: var(--font-display);
  font-size: .98rem; font-weight: 700; color: var(--navy); line-height: 1.3;
}
.comm-card__addr { margin-top: .25rem; font-size: .74rem; color: var(--terracotta-dark); line-height: 1.45; }
.comm-card__media { height: 132px; background: var(--surface-2); overflow: hidden; }
.comm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.comm-card:hover .comm-card__media img { transform: scale(1.05); }
.comm-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .65rem .9rem;
  border-top: 1px solid var(--line);
  background: #fdfcf8;
}
.comm-card__price { font-size: .74rem; color: var(--ink-faint); }
.comm-card__price strong { color: var(--navy); font-weight: 700; }
.comm-card__link {
  font-size: .74rem; font-weight: 700; color: var(--navy);
  display: inline-flex; align-items: center; gap: .3em; white-space: nowrap;
}
.comm-card__link:hover { color: var(--terracotta-dark); }

/* Toolbar above the split */
.comm-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.comm-toolbar + .comm-split { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.comm-count { font-size: var(--fs-tiny); font-weight: 700; color: var(--terracotta-dark); }
