/*
 * Niles Connect Theme 4.0 design system.
 * Loaded after legacy page styles so the theme can progressively normalize
 * WordPress and custom-plugin output while existing page content is rebuilt.
 */
:root {
  --nc-primary: #0a4768;
  --nc-primary-strong: #06344e;
  --nc-primary-soft: #eaf4f7;
  --nc-accent: #b85d32;
  --nc-text: #18313f;
  --nc-heading: #102f42;
  --nc-muted-text: #617783;
  --nc-surface: #ffffff;
  --nc-surface-soft: #f5f8f9;
  --nc-surface-tint: #eef5f7;
  --nc-border: #d7e2e7;
  --nc-border-strong: #b9ccd5;
  --nc-success: #1f6b4f;
  --nc-warning: #8a5a13;
  --nc-danger: #9a2f36;
  --nc-shadow-sm: 0 2px 10px rgba(15, 54, 74, .06);
  --nc-shadow: 0 12px 32px rgba(15, 54, 74, .09);
  --nc-radius-sm: 10px;
  --nc-radius: 16px;
  --nc-radius-lg: 24px;
  --nc-content: 1180px;
  --nc-readable: 74ch;

  /* Backward-compatible aliases used by older theme components. */
  --ah-blue: var(--nc-primary);
  --ah-ink: var(--nc-text);
  --ah-muted: var(--nc-muted-text);
  --ah-border: var(--nc-border);
  --ah-bg: var(--nc-surface-soft);
  --ah-white: var(--nc-surface);
  --ah-radius: var(--nc-radius);
  --ah-shadow: var(--nc-shadow-sm);
  --nc-line: var(--nc-border);
}

html { background: var(--nc-surface-soft); }
body {
  color: var(--nc-text);
  background: var(--nc-surface-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.container { width: min(calc(100% - 40px), var(--nc-content)); margin-inline: auto; }
.site-main { min-height: 55vh; }
.site-main.container,
.page-content { padding-top: 36px; padding-bottom: 52px; }

h1,h2,h3,h4,h5,h6 { color: var(--nc-heading); text-wrap: balance; }
p,li { text-wrap: pretty; }
a { color: var(--nc-primary); }
a:hover { color: var(--nc-primary-strong); }

/* Header and navigation */
.site-header.nc-header {
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--nc-border);
  box-shadow: 0 1px 0 rgba(15,54,74,.02);
}
.site-header__inner { min-height: 78px; gap: 22px; }
.site-header__right { display:flex; align-items:center; justify-content:flex-end; gap:14px; min-width:0; flex:1; }
.site-branding { min-width: 150px; }
.site-logo-image,.custom-logo { display:block; max-width: 220px; max-height: 58px; width:auto; height:auto; }
.main-navigation { min-width:0; }
.main-navigation .menu-primary-container > ul,
.main-navigation > .menu-primary-container > ul { display:flex; align-items:center; gap:2px; margin:0; padding:0; list-style:none; }
.main-navigation li { position:relative; }
.main-navigation a {
  display:flex;
  min-height:44px;
  align-items:center;
  padding:.62rem .7rem;
  border-radius:10px;
  color:var(--nc-text);
  font-weight:700;
  font-size:.91rem;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
}
.main-navigation a:hover,
.main-navigation a:focus-visible,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color:var(--nc-primary-strong);
  background:var(--nc-primary-soft);
}
.main-navigation .sub-menu {
  display:none;
  position:absolute;
  z-index:100;
  top:calc(100% + 6px);
  left:0;
  min-width:220px;
  padding:8px;
  margin:0;
  list-style:none;
  border:1px solid var(--nc-border);
  border-radius:12px;
  background:var(--nc-surface);
  box-shadow:var(--nc-shadow);
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { display:block; }
.main-navigation .sub-menu a { white-space:normal; }

.nc-header-actions { display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.nc-header-share,
.nc-header-login,
.nc-header-register {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:.58rem .82rem;
  border-radius:999px;
  font-size:.9rem;
  font-weight:800;
  text-decoration:none;
}
.nc-header-share { background:var(--nc-primary); color:#fff; }
.nc-header-share:hover { background:var(--nc-primary-strong); color:#fff; }
.nc-header-login { color:var(--nc-primary); }
.nc-header-register { border:1px solid var(--nc-border-strong); background:#fff; }
.nc-account-menu__toggle { min-height:44px; background:#fff; color:var(--nc-text); border:1px solid var(--nc-border); box-shadow:none; }
.nc-account-menu__panel { border:1px solid var(--nc-border); border-radius:12px; background:#fff; box-shadow:var(--nc-shadow); }

/* Universal application components. Plugins can opt into these directly and
   also consume the variables above without knowing the active theme. */
.nc-section-shell { padding-block: 36px; }
.nc-section-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:18px; }
.nc-section-header h2 { margin:0; }
.nc-kicker,.nc-eyebrow {
  color:var(--nc-primary);
  font-size:.76rem;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.nc-lede { max-width:var(--nc-readable); color:var(--nc-muted-text); font-size:1.08rem; }
.nc-grid { display:grid; gap:20px; }
.nc-grid--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.nc-grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.nc-grid--4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.nc-card,.nc-panel {
  min-width:0;
  background:var(--nc-surface);
  border:1px solid var(--nc-border);
  border-radius:var(--nc-radius);
  box-shadow:var(--nc-shadow-sm);
}
.nc-card { padding:20px; }
.nc-panel { padding:24px; }
.nc-card > :first-child,.nc-panel > :first-child { margin-top:0; }
.nc-card > :last-child,.nc-panel > :last-child { margin-bottom:0; }
.nc-badge {
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:.18rem .55rem;
  border-radius:999px;
  background:var(--nc-primary-soft);
  color:var(--nc-primary-strong);
  font-size:.75rem;
  font-weight:800;
}
.nc-button,
.nc-page .button,
.nc-page button:not(.nc-account-menu__toggle),
.nc-page input[type="submit"] {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:.68rem 1rem;
  border:1px solid transparent;
  border-radius:10px;
  background:var(--nc-primary);
  color:#fff;
  font-weight:800;
  line-height:1.15;
  text-decoration:none;
  cursor:pointer;
}
.nc-button:hover,
.nc-page .button:hover,
.nc-page button:not(.nc-account-menu__toggle):hover,
.nc-page input[type="submit"]:hover { background:var(--nc-primary-strong); color:#fff; }
.nc-button--secondary { background:#fff; color:var(--nc-primary); border-color:var(--nc-border-strong); }
.nc-button--secondary:hover { background:var(--nc-primary-soft); color:var(--nc-primary-strong); }
.nc-empty-state { padding:28px; border:1px dashed var(--nc-border-strong); border-radius:var(--nc-radius); background:var(--nc-surface-soft); text-align:center; color:var(--nc-muted-text); }

/* Normalize plugin forms without taking over plugin business logic. */
:where(.cbs-wrap,.cbs-page,.dwcf-wrap,.dwcf-page,.civic-engine,.civic-engine-wrap,.dwim-wrap,.dwim-public,.dwfcm-wrap,.flock-wrap) {
  color:var(--nc-text);
}
:where(.cbs-wrap,.cbs-page,.dwcf-wrap,.dwcf-page,.civic-engine,.civic-engine-wrap,.dwim-wrap,.dwim-public,.dwfcm-wrap,.flock-wrap)
:where(input[type="text"],input[type="email"],input[type="url"],input[type="tel"],input[type="search"],input[type="date"],input[type="number"],select,textarea) {
  width:100%;
  max-width:100%;
  min-height:44px;
  border:1px solid var(--nc-border-strong);
  border-radius:10px;
  padding:.7rem .8rem;
  color:var(--nc-text);
  background:#fff;
}
:where(.cbs-wrap,.cbs-page,.dwcf-wrap,.dwcf-page,.civic-engine,.civic-engine-wrap,.dwim-wrap,.dwim-public,.dwfcm-wrap,.flock-wrap) textarea { min-height:120px; }

/* WordPress editorial system */
.page-header {
  margin-bottom:24px;
  padding:28px 30px;
  background:linear-gradient(145deg,#fff,var(--nc-surface-tint));
  border:1px solid var(--nc-border);
  border-radius:var(--nc-radius-lg);
}
.page-header .page-title { margin:0; font-size:clamp(2rem,5vw,3.35rem); line-height:1.05; }
.archive-description { max-width:var(--nc-readable); margin-top:10px; color:var(--nc-muted-text); }
.archive-description p:last-child { margin-bottom:0; }
.post-card {
  grid-template-columns:minmax(180px,240px) minmax(0,1fr);
  gap:0;
  padding:0;
  overflow:hidden;
  background:var(--nc-surface);
  border:1px solid var(--nc-border);
  border-radius:var(--nc-radius-lg);
  box-shadow:var(--nc-shadow-sm);
}
.post-card__image { display:block; height:100%; min-height:190px; }
.post-card__image img { width:100%; height:100%; min-height:190px; object-fit:cover; border-radius:0; }
.post-card__body { padding:24px; }
.post-card .entry-title { margin:.25rem 0 .55rem; font-size:clamp(1.35rem,2.3vw,1.8rem); }
.entry-meta { display:flex; gap:.35rem .7rem; flex-wrap:wrap; color:var(--nc-muted-text); font-size:.88rem; }
.entry-meta a { color:inherit; }
.entry-summary { color:var(--nc-muted-text); }
.single-article {
  max-width:920px;
  margin-inline:auto;
  padding:clamp(24px,5vw,52px);
  border:1px solid var(--nc-border);
  border-radius:var(--nc-radius-lg);
  box-shadow:var(--nc-shadow-sm);
}
.single-article .entry-header { max-width:780px; margin-inline:auto; text-align:center; }
.single-article .entry-title { font-size:clamp(2.25rem,5.7vw,4rem); }
.single-article .entry-meta { justify-content:center; }
.single-article .featured-image { margin:28px 0; }
.single-article .entry-content { max-width:var(--nc-readable); margin-inline:auto; font-size:1.08rem; }
.single-article .entry-footer { max-width:var(--nc-readable); margin:32px auto 0; padding-top:18px; border-top:1px solid var(--nc-border); }
.cat-links a,.tags-links a { display:inline-flex; margin:.2rem .3rem .2rem 0; padding:.25rem .6rem; border-radius:999px; background:var(--nc-primary-soft); text-decoration:none; font-size:.82rem; font-weight:750; }

.search-form { align-items:stretch; }
.search-field { min-height:44px; }
.search-submit { min-height:44px; border-radius:10px; background:var(--nc-primary); }
.nav-links .page-numbers,.nav-links a { border-color:var(--nc-border); box-shadow:var(--nc-shadow-sm); }
.nav-links .current { background:var(--nc-primary); color:#fff; }

/* Footer */
.nc-site-footer { margin-top:56px; background:#0c2f42; color:#d7e4ea; }
.nc-footer-grid { display:grid; grid-template-columns:1.35fr repeat(4,minmax(130px,1fr)); gap:32px; padding-top:46px; padding-bottom:38px; }
.nc-footer-brand p { max-width:36ch; color:#bcd0d9; }
.nc-footer-logo { font-size:1.25rem; font-weight:900; text-decoration:none; }
.nc-footer-column h2 { margin:0 0 12px; color:#fff; font-size:.85rem; letter-spacing:.09em; text-transform:uppercase; }
.nc-footer-column ul,.nc-footer-menu { list-style:none; padding:0; margin:0; }
.nc-footer-column li { margin:.35rem 0; }
.nc-footer-column a,.nc-footer-managed-menu a { color:#d7e4ea; text-decoration:none; }
.nc-footer-column a:hover,.nc-footer-managed-menu a:hover { color:#fff; text-decoration:underline; }
.nc-footer-managed-menu { grid-column:span 4; }
.nc-footer-menu { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px 24px; }
.nc-footer-menu .sub-menu { list-style:none; padding:.4rem 0 0; margin:0; }
.nc-footer-bottom { border-top:1px solid rgba(255,255,255,.16); padding:18px 0 24px; color:#bcd0d9; font-size:.84rem; }

/* Mobile bottom navigation is useful on phones only. */
.nc-mobile-bottom-nav { display:none; }

@media (max-width: 1120px) {
  .site-header__right { gap:8px; }
  .main-navigation a { padding:.6rem .55rem; font-size:.86rem; }
  .nc-header-register { display:none; }
}

@media (max-width: 960px) {
  .container { width:min(calc(100% - 28px),var(--nc-content)); }
  .site-header__inner { min-height:70px; }
  .menu-toggle { display:inline-flex; align-items:center; gap:8px; margin-left:auto; }
  .site-header__right { flex:0 0 auto; }
  .main-navigation {
    display:none;
    position:absolute;
    top:70px;
    left:14px;
    right:14px;
    max-height:calc(100vh - 90px);
    overflow:auto;
    padding:10px;
    background:#fff;
    border:1px solid var(--nc-border);
    border-radius:14px;
    box-shadow:var(--nc-shadow);
  }
  .main-navigation.toggled { display:block; }
  .main-navigation .menu-primary-container > ul,
  .main-navigation > .menu-primary-container > ul { display:block; }
  .main-navigation a { min-height:46px; padding:.7rem .8rem; font-size:.96rem; white-space:normal; }
  .main-navigation .sub-menu { display:block; position:static; min-width:0; padding:0 0 0 14px; border:0; box-shadow:none; }
  .nc-header-actions { display:none; }
  .nc-mobile-account-actions { display:block; border-top:1px solid var(--nc-border); margin-top:8px; padding-top:8px; }
  .nc-mobile-account-actions a { display:flex; }
  .nc-grid--4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nc-footer-grid { grid-template-columns:1.2fr repeat(2,minmax(0,1fr)); }
  .nc-footer-managed-menu { grid-column:span 2; }
  .nc-footer-menu { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 700px) {
  body { padding-bottom:70px; }
  .site-main.container,.page-content { padding-top:22px; padding-bottom:34px; }
  .site-logo-image,.custom-logo { max-width:175px; max-height:48px; }
  .nc-grid--2,.nc-grid--3,.nc-grid--4 { grid-template-columns:1fr; }
  .nc-section-header { align-items:flex-start; flex-direction:column; gap:8px; }
  .post-card { grid-template-columns:1fr; }
  .post-card__image,.post-card__image img { min-height:180px; max-height:240px; }
  .page-header { padding:22px; border-radius:18px; }
  .single-article { padding:22px; border-radius:18px; }
  .single-article .entry-header { text-align:left; }
  .single-article .entry-meta { justify-content:flex-start; }
  .nc-footer-grid { grid-template-columns:1fr 1fr; gap:26px 20px; }
  .nc-footer-brand { grid-column:1/-1; }
  .nc-footer-managed-menu { grid-column:1/-1; }
  .nc-footer-menu { grid-template-columns:1fr 1fr; }
  .nc-mobile-bottom-nav {
    position:fixed;
    z-index:80;
    left:0;
    right:0;
    bottom:0;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    min-height:64px;
    padding:5px env(safe-area-inset-right) max(5px,env(safe-area-inset-bottom)) env(safe-area-inset-left);
    background:rgba(255,255,255,.98);
    border-top:1px solid var(--nc-border);
    box-shadow:0 -6px 20px rgba(15,54,74,.08);
  }
  .nc-mobile-bottom-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; min-width:0; min-height:54px; color:var(--nc-text); font-size:.67rem; font-weight:750; text-decoration:none; }
  .nc-mobile-bottom-nav a > span:first-child { font-size:1rem; color:var(--nc-primary); }
  .nc-mobile-bottom-nav__share > span:first-child { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:#fff!important; background:var(--nc-primary); }
}

@media (max-width: 430px) {
  .container { width:min(calc(100% - 20px),var(--nc-content)); }
  .nc-footer-grid { grid-template-columns:1fr; }
  .nc-footer-brand,.nc-footer-managed-menu { grid-column:auto; }
  .nc-footer-menu { grid-template-columns:1fr; }
}


/* ================================================================
   4.1 Community-first homepage presentation
   ================================================================ */
body.home {
  --nc-home-ink: #17323f;
  --nc-home-green: #4f7b52;
  --nc-home-green-soft: #edf5ea;
  --nc-home-sun: #d89a45;
  --nc-home-sun-soft: #fff4df;
  --nc-home-blue-soft: #eaf5f8;
  --nc-home-coral: #b95e4f;
  background:#fff;
}
body.home .site-main { overflow:hidden; }
body.home .site-main > .container {
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
}
body.home .single-page,
body.home .entry-content { margin:0; padding:0; }
body.home .entry-content > .nc-home-page {
  margin:0;
  padding:0;
  max-width:none !important;
}

/* A warmer, more editorial masthead. */
body.home .nc-home-page > .nc-hero {
  position:relative;
  isolation:isolate;
  width:min(calc(100% - 40px), 1180px);
  min-height:420px;
  margin:34px auto 18px;
  padding:clamp(42px,7vw,82px) clamp(30px,7vw,82px);
  overflow:hidden;
  border:1px solid #d8e6e2;
  border-radius:30px;
  background:
    radial-gradient(circle at 82% 22%, rgba(216,154,69,.22) 0 72px, transparent 73px),
    radial-gradient(circle at 91% 76%, rgba(79,123,82,.18) 0 120px, transparent 121px),
    linear-gradient(125deg,#edf7f5 0%,#f8fbf7 52%,#fff4df 100%);
  box-shadow:0 20px 55px rgba(26,61,72,.10);
}
body.home .nc-home-page > .nc-hero::after {
  content:"NILES";
  position:absolute;
  z-index:-1;
  right:-.04em;
  bottom:-.23em;
  color:rgba(15,70,92,.055);
  font-size:clamp(8rem,22vw,19rem);
  font-weight:900;
  line-height:.8;
  letter-spacing:-.08em;
  pointer-events:none;
}
body.home .nc-hero .nc-eyebrow {
  display:inline-flex;
  margin:0 0 14px;
  padding:.38rem .7rem;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(79,123,82,.25);
  color:var(--nc-home-green);
  letter-spacing:.14em;
}
body.home .nc-hero h1 {
  max-width:760px;
  margin:0;
  font-size:clamp(2.9rem,7vw,5.8rem);
  line-height:.93;
  letter-spacing:-.055em;
  color:#12384a;
}
body.home .nc-hero > p:not(.nc-eyebrow) {
  max-width:680px;
  margin:24px 0 0;
  color:#45616c;
  font-size:clamp(1.08rem,2vw,1.3rem);
  line-height:1.65;
}
body.home .nc-hero .nc-actions {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:30px;
}
body.home .nc-hero .wp-block-button__link {
  min-height:50px;
  padding:.85rem 1.2rem;
  border-radius:999px;
  font-weight:850;
  box-shadow:0 8px 20px rgba(10,71,104,.12);
}

/* Homepage sections should feel like destinations, not a stream of widgets. */
body.home .nc-home-page > .nc-section-shell {
  width:min(calc(100% - 40px),1180px);
  margin:0 auto;
  padding:52px 0;
}
body.home .nc-home-page > .nc-section-shell + .nc-section-shell {
  border-top:1px solid #e5ecef;
}
body.home .nc-section-header {
  align-items:flex-end;
  margin-bottom:24px;
}
body.home .nc-section-header h2 {
  font-size:clamp(1.8rem,3.4vw,2.65rem);
  letter-spacing:-.035em;
}
body.home .nc-section-header p { color:#5f747d; }
body.home .nc-section-header > p:last-child a {
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:.5rem .8rem;
  border-radius:999px;
  background:#f1f6f7;
  font-weight:800;
  text-decoration:none;
}

/* Alternating community color fields create rhythm without looking corporate. */
body.home .nc-home-page > .nc-section-shell:nth-of-type(4),
body.home .nc-home-page > .nc-section-shell:nth-of-type(8) {
  width:min(calc(100% - 28px),1204px);
  margin-block:18px;
  padding:42px 32px;
  border:0;
  border-radius:26px;
  background:var(--nc-home-green-soft);
}
body.home .nc-home-page > .nc-section-shell:nth-of-type(6) {
  width:min(calc(100% - 28px),1204px);
  margin-block:18px;
  padding:42px 32px;
  border:0;
  border-radius:26px;
  background:var(--nc-home-blue-soft);
}
body.home .nc-home-page > .nc-section-shell:nth-of-type(9) {
  width:min(calc(100% - 28px),1204px);
  margin-block:18px 50px;
  padding:42px 32px;
  border:0;
  border-radius:26px;
  background:var(--nc-home-sun-soft);
}

/* Make the WordPress grid utility actually win over block layout defaults. */
body.home .wp-block-group.nc-grid { display:grid !important; }
body.home .wp-block-group.nc-grid--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.home .wp-block-group.nc-grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }

body.home .nc-panel,
body.home .nc-card {
  border-color:#dce6e8;
  border-radius:20px;
  box-shadow:0 10px 30px rgba(19,55,70,.07);
}
body.home .nc-card {
  position:relative;
  padding:26px;
  overflow:hidden;
}
body.home .nc-card::before {
  content:"";
  display:block;
  width:44px;
  height:5px;
  margin-bottom:20px;
  border-radius:999px;
  background:var(--nc-home-green);
}
body.home .nc-card h3 { margin:.1rem 0 .6rem; font-size:1.25rem; }
body.home .nc-card p { color:#586f79; }
body.home .nc-card a { font-weight:800; }

/* Civic Engine: use an editorial card grid on the homepage. */
body.home .civic-engine-experience > .civic-engine-section-head { display:none; }
body.home .civic-engine-card-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
body.home .civic-engine-card-list-important { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.home .civic-engine-card-list > * {
  margin:0 !important;
  min-height:100%;
  border:1px solid #dce6e8 !important;
  border-radius:18px !important;
  box-shadow:0 8px 24px rgba(19,55,70,.06) !important;
  background:#fff !important;
}

/* Community Board feeds: cards, not long bordered rows. */
body.home :where(.cbs-feed,.cbs-feed-list,.cbs-business-directory-grid) {
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px !important;
}
body.home :where(.cbs-feed-item,.cbs-feed-card,.cbs-business-card,.cbs-empty-state) {
  margin:0 !important;
  border:1px solid #dce6e8 !important;
  border-radius:18px !important;
  box-shadow:0 8px 24px rgba(19,55,70,.055) !important;
  background:#fff !important;
}
body.home .cbs-empty-state { grid-column:1/-1; padding:28px !important; }

/* Latest posts become a recognizable neighborhood-news strip. */
body.home .nc-latest-posts {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin:0;
  padding:0;
}
body.home .nc-latest-posts li {
  display:flex;
  flex-direction:column;
  min-width:0;
  margin:0;
  overflow:hidden;
  border:1px solid #dce6e8;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 24px rgba(19,55,70,.055);
}
body.home .nc-latest-posts .wp-block-latest-posts__featured-image { margin:0; }
body.home .nc-latest-posts .wp-block-latest-posts__featured-image img {
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
}
body.home .nc-latest-posts > li > a:not(:has(img)) {
  display:block;
  padding:18px 18px 8px;
  color:var(--nc-heading);
  font-size:1.04rem;
  font-weight:850;
  line-height:1.35;
  text-decoration:none;
}
body.home .nc-latest-posts time { padding:0 18px 18px; color:#748891; font-size:.82rem; }

/* The closing involvement panel is a warm invitation, not a utility footer. */
body.home .nc-home-page > .nc-section-shell:last-child .nc-panel {
  padding:clamp(30px,6vw,54px);
  border:0;
  border-radius:26px;
  background:linear-gradient(120deg,#123d53,#0a5675);
  color:#fff;
  box-shadow:0 18px 45px rgba(10,71,104,.16);
}
body.home .nc-home-page > .nc-section-shell:last-child .nc-panel h2,
body.home .nc-home-page > .nc-section-shell:last-child .nc-panel .nc-kicker,
body.home .nc-home-page > .nc-section-shell:last-child .nc-panel p { color:#fff; }
body.home .nc-home-page > .nc-section-shell:last-child .nc-panel p { max-width:760px; opacity:.9; }
body.home .nc-home-page > .nc-section-shell:last-child .wp-block-button__link {
  border-radius:999px;
  background:#fff;
  color:#12445c;
}
body.home .nc-home-page > .nc-section-shell:last-child .nc-button--secondary .wp-block-button__link,
body.home .nc-home-page > .nc-section-shell:last-child .wp-block-button.nc-button--secondary .wp-block-button__link {
  border:1px solid rgba(255,255,255,.45);
  background:rgba(255,255,255,.1);
  color:#fff;
}

/* Footer transition from the homepage. */
body.home .site-footer { margin-top:0; }

@media (max-width: 900px) {
  body.home .nc-home-page > .nc-hero { min-height:0; padding:50px 32px; }
  body.home .nc-latest-posts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.home .civic-engine-card-list,
  body.home .civic-engine-card-list-important,
  body.home :where(.cbs-feed,.cbs-feed-list,.cbs-business-directory-grid) { grid-template-columns:1fr; }
  body.home .wp-block-group.nc-grid--3 { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
  body.home .nc-home-page > .nc-hero,
  body.home .nc-home-page > .nc-section-shell,
  body.home .nc-home-page > .nc-section-shell:nth-of-type(4),
  body.home .nc-home-page > .nc-section-shell:nth-of-type(6),
  body.home .nc-home-page > .nc-section-shell:nth-of-type(8),
  body.home .nc-home-page > .nc-section-shell:nth-of-type(9) {
    width:min(calc(100% - 24px),1180px);
  }
  body.home .nc-home-page > .nc-section-shell:nth-of-type(4),
  body.home .nc-home-page > .nc-section-shell:nth-of-type(6),
  body.home .nc-home-page > .nc-section-shell:nth-of-type(8),
  body.home .nc-home-page > .nc-section-shell:nth-of-type(9) { padding:34px 20px; }
  body.home .nc-section-header { align-items:flex-start; flex-direction:column; gap:8px; }
  body.home .nc-latest-posts { grid-template-columns:1fr; }
  body.home .wp-block-group.nc-grid--2 { grid-template-columns:1fr; }
  body.home .nc-hero h1 { font-size:clamp(2.45rem,14vw,4rem); }
}

/* ==========================================================
   Niles Connect 4.2 - editorial/community page composition
   ========================================================== */
.nc-today,
.nc-community-page {
  --nc-home-ink: #173042;
  --nc-home-navy: #16334a;
  --nc-home-blue: #235f85;
  --nc-home-green: #43725b;
  --nc-home-green-soft: #eef5f0;
  --nc-home-gold: #c7963e;
  --nc-home-cream: #f8f5ee;
  --nc-home-sky: #edf5f8;
  --nc-home-border: #dce5e8;
  color: var(--nc-home-ink);
  display: grid;
  gap: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.nc-today a { text-underline-offset: .16em; }
.nc-today__hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.75rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 5rem);
  margin-inline: calc(50% - 50vw);
  padding-inline: max(clamp(1.5rem, 5vw, 5rem), calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 85% 18%, rgba(255,255,255,.17) 0 8rem, transparent 8.1rem),
    radial-gradient(circle at 95% 80%, rgba(199,150,62,.22) 0 11rem, transparent 11.1rem),
    linear-gradient(135deg, #15374f 0%, #245e77 56%, #3d735f 100%);
  color: #fff;
}
.nc-today__hero::after {
  content: "";
  position: absolute;
  right: 7%; top: 12%;
  width: clamp(180px, 23vw, 340px); aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 44% 56% 58% 42% / 45% 42% 58% 55%;
  transform: rotate(12deg);
  pointer-events: none;
}
.nc-today__eyebrow,
.nc-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .8rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nc-today__eyebrow::before,
.nc-section-kicker::before { content:""; width:1.9rem; height:2px; background:currentColor; opacity:.55; }
.nc-today__hero h1 { max-width: 13ch; margin:0; color:#fff; font-size:clamp(2.75rem,7vw,5.5rem); line-height:.96; letter-spacing:-.045em; }
.nc-today__hero-copy > p:not(.nc-today__eyebrow) { max-width: 650px; font-size:clamp(1.08rem,2vw,1.35rem); line-height:1.6; color:rgba(255,255,255,.9); }
.nc-today__hero-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.6rem; }
.nc-today__hero-actions a { display:inline-flex; min-height:48px; align-items:center; justify-content:center; padding:.75rem 1.1rem; border-radius:999px; font-weight:800; text-decoration:none; }
.nc-today__hero-actions .is-primary { background:#fff; color:var(--nc-home-navy); }
.nc-today__hero-actions .is-secondary { color:#fff; border:1px solid rgba(255,255,255,.55); background:rgba(255,255,255,.08); }
.nc-today__hero-panel { position:relative; z-index:1; padding:1.5rem; border:1px solid rgba(255,255,255,.2); border-radius:24px; background:rgba(10,32,45,.3); backdrop-filter:blur(7px); box-shadow:0 25px 55px rgba(5,25,36,.16); }
.nc-today__hero-panel strong { display:block; font-size:1rem; margin-bottom:1rem; }
.nc-today__hero-panel ul { list-style:none; padding:0; margin:0; display:grid; gap:.6rem; }
.nc-today__hero-panel a { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.72rem .8rem; border-radius:12px; color:#fff; text-decoration:none; background:rgba(255,255,255,.08); }
.nc-today__hero-panel a:hover { background:rgba(255,255,255,.15); }

.nc-home-shortcuts { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.85rem; margin-top:clamp(-5rem,-6vw,-3rem); position:relative; z-index:4; }
.nc-home-shortcut { min-height:150px; display:flex; flex-direction:column; justify-content:space-between; padding:1.25rem; border:1px solid var(--nc-home-border); border-radius:18px; background:#fff; color:var(--nc-home-ink); text-decoration:none; box-shadow:0 12px 36px rgba(24,58,77,.09); transition:.18s ease; }
.nc-home-shortcut:hover { transform:translateY(-3px); box-shadow:0 18px 44px rgba(24,58,77,.14); }
.nc-home-shortcut__icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:var(--nc-home-sky); font-size:1.3rem; }
.nc-home-shortcut strong { display:block; margin-top:1rem; font-size:1.03rem; }
.nc-home-shortcut span:last-child { color:#607682; font-size:.88rem; line-height:1.45; }

.nc-home-section { display:grid; gap:1.5rem; }
.nc-home-section--band { margin-inline:calc(50% - 50vw); padding:clamp(3rem,7vw,5.5rem) max(clamp(1.25rem,4vw,3rem), calc((100vw - 1180px)/2)); }
.nc-home-section--cream { background:var(--nc-home-cream); }
.nc-home-section--sky { background:var(--nc-home-sky); }
.nc-home-section__head { display:flex; align-items:end; justify-content:space-between; gap:2rem; }
.nc-home-section__head h2 { margin:.1rem 0 0; font-size:clamp(2rem,4vw,3.1rem); letter-spacing:-.035em; color:var(--nc-home-navy); }
.nc-home-section__head p { max-width:670px; margin:.45rem 0 0; color:#637984; line-height:1.6; }
.nc-home-section__head > a { flex:0 0 auto; font-weight:800; text-decoration:none; color:var(--nc-home-blue); }
.nc-section-kicker { color:var(--nc-home-green); }

.nc-home-split { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr); gap:clamp(1.5rem,4vw,3rem); align-items:start; }
.nc-home-pane { min-width:0; }
.nc-home-pane--events { background:#fff; border:1px solid var(--nc-home-border); border-radius:22px; padding:1.25rem 1.35rem; box-shadow:0 12px 32px rgba(24,58,77,.06); }
.nc-home-pane__title { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.6rem; }
.nc-home-pane__title h3 { margin:0; font-size:1.25rem; }
.nc-home-pane__title a { font-size:.88rem; font-weight:800; text-decoration:none; }

.nc-home-civic-spotlight { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(250px,.8fr); gap:1rem; }
.nc-home-civic-item { padding:1.15rem 1.2rem; border:1px solid var(--nc-home-border); border-radius:18px; background:#fff; }
.nc-home-civic-item.is-featured { grid-row:span 2; min-height:280px; padding:clamp(1.4rem,3vw,2rem); background:linear-gradient(160deg,#fff 0%,#f4f8f7 100%); box-shadow:0 16px 38px rgba(24,58,77,.08); }
.nc-home-civic-item h3 { margin:.8rem 0 .55rem; font-size:1.08rem; line-height:1.28; color:var(--nc-home-navy); }
.nc-home-civic-item.is-featured h3 { font-size:clamp(1.55rem,3vw,2.3rem); }
.nc-home-civic-item p { color:#617782; line-height:1.6; }
.nc-home-civic-meta { display:flex; flex-wrap:wrap; gap:.65rem; align-items:center; color:#6c7d85; font-size:.78rem; }
.nc-home-pill { display:inline-flex; padding:.3rem .52rem; border-radius:999px; background:#eaf2f6; color:#285b76; font-size:.67rem; font-weight:900; letter-spacing:.09em; }
.nc-home-pill-alert,.nc-home-pill-emergency { background:#fcebea; color:#8a2f2b; }
.nc-home-pill-event,.nc-home-pill-meeting { background:#eef3e8; color:#4a6d42; }
.nc-home-civic-source { margin-top:.75rem; font-size:.83rem; }
.nc-home-civic-source a { font-weight:800; }

.nc-home-event-list { display:grid; gap:.2rem; }
.nc-home-event { display:grid; grid-template-columns:62px minmax(0,1fr); gap:.9rem; align-items:start; padding:1rem 0; border-bottom:1px solid #e2e9eb; }
.nc-home-event:last-child { border-bottom:0; }
.nc-home-event-date { width:58px; min-height:62px; display:grid; place-content:center; text-align:center; border-radius:14px; background:var(--nc-home-navy); color:#fff; line-height:1; }
.nc-home-event-date span { font-size:.67rem; letter-spacing:.12em; font-weight:900; }
.nc-home-event-date strong { margin-top:.22rem; font-size:1.55rem; }
.nc-home-event-copy h3 { margin:.05rem 0 .3rem; font-size:1rem; line-height:1.3; color:var(--nc-home-navy); }
.nc-home-event-copy p,.nc-home-event-source { margin:.2rem 0; color:#687b84; font-size:.82rem; line-height:1.4; }
.nc-home-event-source a { font-weight:800; }

:where(.nc-today, .nc-community-page) .nc-latest-activity { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
:where(.nc-today, .nc-community-page) .nc-activity-item { position:relative; padding:1.35rem; border:1px solid var(--nc-home-border); border-radius:18px; background:#fff; box-shadow:0 10px 28px rgba(24,58,77,.05); }
:where(.nc-today, .nc-community-page) .nc-activity-item__type { display:inline-flex; margin-bottom:.75rem; color:var(--nc-home-green); font-size:.7rem; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }
:where(.nc-today, .nc-community-page) .nc-activity-item h3 { margin:0 0 .45rem; font-size:1.08rem; }
:where(.nc-today, .nc-community-page) .nc-activity-item h3 a { color:var(--nc-home-navy); text-decoration:none; }
:where(.nc-today, .nc-community-page) .nc-activity-item p { color:#647983; font-size:.91rem; line-height:1.5; }
:where(.nc-today, .nc-community-page) .nc-activity-item time { color:#7a8b92; font-size:.78rem; }

.nc-home-stories { display:grid; grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(220px,.65fr)); gap:1.1rem; }
.nc-home-story { overflow:hidden; border:1px solid var(--nc-home-border); border-radius:20px; background:#fff; box-shadow:0 12px 34px rgba(24,58,77,.06); }
.nc-home-story__media { display:block; aspect-ratio:16/10; overflow:hidden; background:linear-gradient(135deg,#d9eaf0,#dfeade); }
.nc-home-story__media img { width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.nc-home-story:hover .nc-home-story__media img { transform:scale(1.025); }
.nc-home-story__media--placeholder { display:grid; place-items:center; }
.nc-home-story__media--placeholder span { font-size:clamp(2rem,5vw,4rem); font-weight:900; letter-spacing:-.07em; color:rgba(28,75,97,.22); }
.nc-home-story__body { padding:1.2rem; }
.nc-home-story.is-featured .nc-home-story__body { padding:1.45rem; }
.nc-home-story__meta { display:flex; flex-wrap:wrap; gap:.55rem; color:#758890; font-size:.75rem; }
.nc-home-story__meta span { color:var(--nc-home-green); font-weight:900; text-transform:uppercase; letter-spacing:.07em; }
.nc-home-story h3 { margin:.55rem 0; font-size:1.2rem; line-height:1.25; }
.nc-home-story.is-featured h3 { font-size:clamp(1.7rem,3vw,2.5rem); }
.nc-home-story h3 a { color:var(--nc-home-navy); text-decoration:none; }
.nc-home-story p { margin:.5rem 0 1rem; color:#617680; line-height:1.55; }
.nc-home-story__link { font-weight:900; color:var(--nc-home-blue); text-decoration:none; }
.nc-home-stories--count-1 { grid-template-columns:minmax(0,1fr); }
.nc-home-stories--count-1 .nc-home-story { display:grid; grid-template-columns:minmax(280px,.95fr) minmax(0,1.05fr); }
.nc-home-stories--count-1 .nc-home-story__media { aspect-ratio:auto; min-height:330px; }

.nc-home-business-invite { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2rem; padding:clamp(1.5rem,4vw,2.5rem); border-radius:24px; background:linear-gradient(135deg,#edf5ef,#f9f5ea); border:1px solid #d8e6da; }
.nc-home-business-invite h3 { margin:0 0 .4rem; font-size:clamp(1.45rem,3vw,2.1rem); color:var(--nc-home-navy); }
.nc-home-business-invite p { margin:0; color:#607681; }
.nc-home-business-invite a { display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:.7rem 1rem; border-radius:999px; background:var(--nc-home-green); color:#fff; font-weight:900; text-decoration:none; }

.nc-home-accountability { margin-inline:calc(50% - 50vw); padding:clamp(3.3rem,7vw,5.5rem) max(clamp(1.25rem,4vw,3rem), calc((100vw - 1180px)/2)); background:linear-gradient(140deg,#122f43,#1f4556); color:#fff; }
.nc-home-accountability .nc-section-kicker { color:#cfaf69; }
.nc-home-accountability .nc-home-section__head h2,.nc-home-accountability .nc-home-section__head p { color:#fff; }
.nc-home-accountability .nc-home-section__head p { opacity:.75; }
.nc-home-accountability__grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.nc-home-accountability-card { min-height:210px; display:flex; flex-direction:column; padding:1.4rem; border:1px solid rgba(255,255,255,.16); border-radius:20px; background:rgba(255,255,255,.06); color:#fff; text-decoration:none; }
.nc-home-accountability-card:hover { background:rgba(255,255,255,.11); }
.nc-home-accountability-card span { color:#d6b871; font-size:.72rem; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.nc-home-accountability-card h3 { margin:auto 0 .55rem; color:#fff; font-size:1.45rem; }
.nc-home-accountability-card p { margin:0; color:rgba(255,255,255,.72); line-height:1.5; }

.nc-home-join { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:2rem; padding:clamp(1.75rem,5vw,3.25rem); border:1px solid var(--nc-home-border); border-radius:26px; background:#fff; box-shadow:0 16px 46px rgba(24,58,77,.07); }
.nc-home-join h2 { margin:0 0 .5rem; color:var(--nc-home-navy); font-size:clamp(2rem,4vw,3rem); }
.nc-home-join p { margin:0; max-width:720px; color:#617680; font-size:1.03rem; line-height:1.6; }
.nc-home-join__actions { display:flex; flex-wrap:wrap; gap:.7rem; }
.nc-home-join__actions a { min-height:46px; display:inline-flex; align-items:center; padding:.7rem 1rem; border-radius:999px; font-weight:900; text-decoration:none; }
.nc-home-join__actions .is-primary { background:var(--nc-home-navy); color:#fff; }
.nc-home-join__actions .is-secondary { border:1px solid var(--nc-home-border); color:var(--nc-home-navy); }

.nc-home-empty { display:flex; flex-direction:column; gap:.25rem; padding:1.2rem; border:1px dashed #bfd0d6; border-radius:16px; background:rgba(255,255,255,.7); color:#617680; }
.nc-home-empty strong { color:var(--nc-home-navy); }

@media (max-width: 980px) {
  .nc-today__hero { grid-template-columns:1fr; }
  .nc-today__hero-panel { max-width:620px; }
  .nc-home-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:-2.25rem; }
  .nc-home-shortcut:last-child { grid-column:1/-1; min-height:110px; }
  .nc-home-split,.nc-home-stories--count-1 .nc-home-story,.nc-home-business-invite,.nc-home-join { grid-template-columns:1fr; }
  .nc-home-stories { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nc-home-story.is-featured { grid-column:1/-1; }
  .nc-home-accountability__grid,:where(.nc-today, .nc-community-page) .nc-latest-activity { grid-template-columns:1fr 1fr; }
  .nc-home-civic-spotlight { grid-template-columns:1fr; }
  .nc-home-civic-item.is-featured { grid-row:auto; min-height:0; }
}
@media (max-width: 640px) {
  .nc-today { gap:3.2rem; }
  .nc-today__hero { padding-top:3.2rem; padding-bottom:4.3rem; }
  .nc-home-shortcuts { grid-template-columns:1fr 1fr; gap:.65rem; }
  .nc-home-shortcut { min-height:125px; padding:1rem; }
  .nc-home-shortcut:last-child { grid-column:1/-1; }
  .nc-home-section__head { align-items:start; flex-direction:column; gap:.75rem; }
  .nc-home-stories,.nc-home-accountability__grid,:where(.nc-today, .nc-community-page) .nc-latest-activity { grid-template-columns:1fr; }
  .nc-home-story.is-featured { grid-column:auto; }
  .nc-home-story__media { aspect-ratio:16/9; }
  .nc-home-join__actions { width:100%; }
  .nc-home-join__actions a { flex:1; justify-content:center; }
}


/* ==========================================================
   Niles Connect 4.3 - homepage refinement + development notice
   ========================================================== */
.nc-today { gap:clamp(2rem,4.5vw,3.8rem); padding-bottom:clamp(2.5rem,5vw,4rem); }
.nc-today__hero { padding-top:clamp(2.5rem,5vw,4.5rem); padding-bottom:clamp(3.7rem,6vw,5.2rem); }
.nc-today__hero h1 { font-size:clamp(2.7rem,6vw,5rem); }
.nc-home-shortcuts { gap:.7rem; margin-top:clamp(-4.2rem,-5vw,-2.8rem); }
.nc-home-shortcut { min-height:118px; padding:1rem 1.05rem; border-radius:16px; }
.nc-home-shortcut__icon { width:36px; height:36px; border-radius:11px; font-size:1.05rem; }
.nc-home-shortcut strong { margin-top:.7rem; }
.nc-home-shortcut span:last-child { font-size:.82rem; }
.nc-home-section { gap:1.1rem; }
.nc-home-section--band { padding-top:clamp(2.2rem,4vw,3.5rem); padding-bottom:clamp(2.2rem,4vw,3.5rem); }
.nc-home-section__head h2 { font-size:clamp(1.9rem,3.5vw,2.75rem); }
.nc-home-split { grid-template-columns:minmax(0,1.05fr) minmax(330px,.95fr); gap:clamp(1.2rem,3vw,2rem); }
:where(.nc-today, .nc-community-page) .nc-latest-activity { grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); }
.nc-home-accountability { padding-top:clamp(2.5rem,5vw,4rem); padding-bottom:clamp(2.5rem,5vw,4rem); }
.nc-home-accountability__grid > p, .nc-home-accountability__grid > br { display:none !important; }
.nc-home-accountability-card { box-sizing:border-box; min-height:190px; }
.nc-home-accountability-card h3 { margin-top:auto; }
.nc-home-business-invite { padding:clamp(1.35rem,3vw,2rem); }
.nc-home-join { padding:clamp(1.5rem,3.5vw,2.5rem); }

.nc-dev-notice[hidden] { display:none !important; }
.nc-dev-notice { position:fixed; inset:0; z-index:999999; display:grid; place-items:center; padding:1.25rem; }
.nc-dev-notice__backdrop { position:absolute; inset:0; background:rgba(9,27,39,.64); backdrop-filter:blur(3px); }
.nc-dev-notice__dialog { position:relative; width:min(620px,100%); max-height:calc(100vh - 2.5rem); overflow:auto; padding:clamp(1.5rem,4vw,2.35rem); border:1px solid rgba(255,255,255,.55); border-radius:24px; background:#fff; box-shadow:0 28px 90px rgba(5,24,36,.32); color:#173042; }
.nc-dev-notice__kicker { margin:0 0 .55rem; color:#43725b; font-size:.74rem; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
.nc-dev-notice__dialog h2 { margin:0 2.25rem 1rem 0; color:#16334a; font-size:clamp(1.8rem,4vw,2.5rem); line-height:1.05; letter-spacing:-.03em; }
.nc-dev-notice__dialog p { margin:.85rem 0; line-height:1.6; color:#536b77; }
.nc-dev-notice__dialog p strong { color:#173042; }
.nc-dev-notice__close { position:absolute; top:.8rem; right:.85rem; width:40px; height:40px; display:grid; place-items:center; border:0; border-radius:50%; background:#edf5f8; color:#16334a; font-size:1.65rem; line-height:1; cursor:pointer; }
.nc-dev-notice__dismiss { margin-top:.55rem; min-height:44px; padding:.65rem 1.1rem; border:0; border-radius:999px; background:#16334a; color:#fff; font:inherit; font-weight:900; cursor:pointer; }
.nc-dev-notice__close:focus-visible,.nc-dev-notice__dismiss:focus-visible { outline:3px solid #c7963e; outline-offset:3px; }
html.nc-dev-notice-open, html.nc-dev-notice-open body { overflow:hidden; }
@media (max-width:640px) {
  .nc-today { gap:2.35rem; }
  .nc-home-shortcut { min-height:108px; }
  .nc-dev-notice { padding:.75rem; }
  .nc-dev-notice__dialog { border-radius:18px; }
}

/* ==========================================================
   Niles Connect 4.4 - audited homepage + mobile + dev notice
   ========================================================== */
html.nc-dev-notice-dismissed .nc-dev-notice { display:none !important; }
.nc-dev-notice { overscroll-behavior:contain; }

/* Homepage rhythm. Keep sections visually related instead of separated by
   oversized dead zones. */
.nc-today { gap:clamp(1.7rem,3vw,2.7rem); padding-bottom:clamp(2rem,4vw,3rem); }
.nc-today__hero { padding-top:clamp(2.4rem,4.2vw,3.9rem); padding-bottom:clamp(3.2rem,5vw,4.4rem); }
.nc-home-shortcuts { margin-top:clamp(-3.6rem,-4.2vw,-2.35rem); }
.nc-home-shortcut { min-height:108px; }
.nc-home-section { gap:.9rem; }
.nc-home-section--band { padding-top:clamp(1.9rem,3.2vw,2.8rem); padding-bottom:clamp(1.9rem,3.2vw,2.8rem); }
.nc-home-accountability { padding-top:clamp(2.2rem,4vw,3.2rem); padding-bottom:clamp(2.2rem,4vw,3.2rem); }
.nc-home-accountability-card { min-height:165px; }
.nc-home-join { padding:clamp(1.35rem,2.8vw,2rem); }
.nc-home-stories--count-1 .nc-home-story__media { min-height:260px; }
.nc-home-civic-item.is-featured { min-height:220px; }

/* Improve sparse community layouts. */
.nc-home-pane .nc-latest-activity:has(.nc-activity-item:only-child) { grid-template-columns:1fr; }
.nc-home-pane .nc-latest-activity:has(.nc-activity-item:only-child) .nc-activity-item { min-height:170px; }

/* Tablet */
@media (max-width: 900px) {
  .nc-today__hero { grid-template-columns:1fr; gap:1.4rem; }
  .nc-today__hero-panel { max-width:none; }
  .nc-home-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nc-home-shortcut:last-child { grid-column:1/-1; }
  .nc-home-split { grid-template-columns:1fr; }
  .nc-home-pane--events { padding:1rem 1.1rem; }
  .nc-home-accountability__grid { grid-template-columns:1fr; }
  .nc-home-accountability-card { min-height:145px; }
}

/* Phone */
@media (max-width: 640px) {
  html { overflow-x:hidden; }
  body { overflow-x:hidden; padding-bottom:68px; }
  .container { width:min(100% - 24px,1160px); }
  .site-header__inner { min-height:64px; gap:10px; }
  .site-branding .custom-logo,.site-logo-image { max-height:46px; max-width:122px; }
  .nc-header-actions { display:none; }
  .nc-menu-toggle { display:inline-flex; min-height:44px; min-width:44px; justify-content:center; }
  .main-navigation { left:12px; right:12px; top:calc(100% + 6px); max-height:calc(100dvh - 88px); }

  .nc-today { gap:1.65rem; }
  .nc-today__hero { margin-inline:calc(50% - 50vw); padding:2.25rem 1.05rem 3.2rem; border-radius:0; }
  .nc-today__hero h1 { max-width:12ch; font-size:clamp(2.5rem,13vw,3.7rem); }
  .nc-today__hero-copy > p:not(.nc-today__eyebrow) { font-size:1rem; line-height:1.52; }
  .nc-today__hero-actions { gap:.55rem; }
  .nc-today__hero-actions a { flex:1 1 145px; min-height:46px; padding:.65rem .85rem; }
  .nc-today__hero-panel { padding:1rem; border-radius:18px; }
  .nc-today__hero-panel a { min-height:44px; padding:.65rem .75rem; }

  .nc-home-shortcuts { grid-template-columns:1fr; gap:.5rem; margin-top:-2.25rem; }
  .nc-home-shortcut,.nc-home-shortcut:last-child { grid-column:auto; min-height:0; display:grid; grid-template-columns:38px minmax(0,1fr); column-gap:.8rem; row-gap:.12rem; align-items:center; padding:.8rem .9rem; }
  .nc-home-shortcut__icon { grid-row:1/3; width:38px; height:38px; }
  .nc-home-shortcut strong { margin:0; }
  .nc-home-shortcut span:last-child { font-size:.78rem; }

  .nc-home-section__head { gap:.5rem; }
  .nc-home-section__head h2 { font-size:clamp(1.75rem,9vw,2.3rem); }
  .nc-home-section__head p { font-size:.92rem; }
  .nc-home-section--band,.nc-home-accountability { margin-inline:calc(50% - 50vw); padding-inline:1rem; }
  .nc-home-civic-spotlight { gap:.65rem; }
  .nc-home-civic-item { padding:1rem; border-radius:15px; }
  .nc-home-civic-item.is-featured { min-height:0; }
  .nc-home-event { grid-template-columns:52px minmax(0,1fr); gap:.7rem; padding:.8rem 0; }
  .nc-home-event-date { width:50px; min-height:54px; border-radius:12px; }
  .nc-home-event-date strong { font-size:1.3rem; }

  .nc-home-stories--count-1 .nc-home-story { display:block; }
  .nc-home-stories--count-1 .nc-home-story__media { min-height:0; aspect-ratio:16/9; }
  .nc-home-story__body,.nc-home-story.is-featured .nc-home-story__body { padding:1rem; }
  .nc-home-story.is-featured h3 { font-size:1.65rem; }
  .nc-home-business-invite { gap:1rem; padding:1.15rem; border-radius:18px; }
  .nc-home-business-invite a { width:100%; }
  .nc-home-accountability-card { min-height:130px; padding:1.05rem; border-radius:16px; }
  .nc-home-accountability-card h3 { margin:.8rem 0 .35rem; }
  .nc-home-join { gap:1rem; padding:1.15rem; border-radius:18px; }
  .nc-home-join h2 { font-size:2rem; }
  .nc-home-join__actions { display:grid; grid-template-columns:1fr; }

  .nc-dev-notice { padding:.6rem; align-items:end; }
  .nc-dev-notice__dialog { width:100%; max-height:min(82dvh,720px); padding:1.2rem; border-radius:20px 20px 14px 14px; }
  .nc-dev-notice__dialog h2 { font-size:1.75rem; }
  .nc-dev-notice__dialog p { font-size:.94rem; line-height:1.5; }
  .nc-dev-notice__dismiss { width:100%; min-height:48px; }
}

@media (max-width: 380px) {
  .nc-today__hero h1 { font-size:2.35rem; }
  .nc-home-shortcut span:last-child { font-size:.74rem; }
  .nc-home-event-copy h3 { font-size:.93rem; }
  .nc-mobile-bottom-nav a { font-size:.62rem; }
}

/* ==========================================================
   Niles Connect 4.5 - News & Events editorial page
   ========================================================== */
.nc-news-page { display:grid; gap:clamp(2rem,4vw,3.5rem); padding-bottom:clamp(2.5rem,5vw,4rem); }
.nc-news-hero { position:relative; overflow:hidden; display:grid; grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr); gap:clamp(2rem,5vw,4.5rem); align-items:end; padding:clamp(2.5rem,5vw,4.5rem); border-radius:28px; background:linear-gradient(135deg,#123f58 0%,#1d6877 62%,#4f7b5a 100%); color:#fff; }
.nc-news-hero:after { content:""; position:absolute; width:330px; height:330px; right:-95px; top:-110px; border:1px solid rgba(255,255,255,.17); border-radius:50%; box-shadow:-95px 95px 0 -1px rgba(255,255,255,.05),-170px 185px 0 -1px rgba(255,255,255,.04); pointer-events:none; }
.nc-news-hero__copy,.nc-news-hero__aside { position:relative; z-index:1; }
.nc-news-hero__eyebrow { margin:0 0 .7rem; font-size:.72rem; font-weight:900; letter-spacing:.17em; text-transform:uppercase; color:#dbe8ba; }
.nc-news-hero h1 { max-width:10ch; margin:0; font-size:clamp(2.7rem,6vw,5rem); line-height:.96; letter-spacing:-.045em; color:#fff; }
.nc-news-hero__lead { max-width:660px; margin:1.1rem 0 0; color:rgba(255,255,255,.88); font-size:clamp(1rem,1.7vw,1.18rem); line-height:1.6; }
.nc-news-hero__aside { padding:1.2rem; border:1px solid rgba(255,255,255,.16); border-radius:20px; background:rgba(10,42,57,.38); backdrop-filter:blur(8px); }
.nc-news-hero__aside strong { display:block; margin-bottom:.7rem; }
.nc-news-hero__aside a { display:flex; align-items:center; justify-content:space-between; gap:1rem; min-height:44px; padding:.65rem .8rem; border-top:1px solid rgba(255,255,255,.13); color:#fff; font-weight:800; text-decoration:none; }
.nc-news-hero__aside a:first-of-type { border-top:0; }
.nc-news-topic-nav { display:flex; gap:.55rem; overflow-x:auto; scrollbar-width:thin; padding:.1rem .05rem .35rem; }
.nc-news-topic-nav a { flex:0 0 auto; display:inline-flex; align-items:center; min-height:40px; padding:.55rem .85rem; border:1px solid var(--nc-home-border); border-radius:999px; background:#fff; color:var(--nc-home-navy); font-size:.82rem; font-weight:800; text-decoration:none; box-shadow:0 5px 18px rgba(24,58,77,.04); }
.nc-news-topic-nav a:hover,.nc-news-topic-nav a:focus-visible { border-color:#89aeb8; background:#edf6f7; }
.nc-news-section { display:grid; gap:1rem; }
.nc-news-section--band { margin-inline:calc(50% - 50vw); padding:clamp(2rem,4vw,3.2rem) max(1rem,calc((100vw - min(1160px,100% - 32px))/2)); background:#f6f3ec; }
.nc-news-section__head { display:flex; align-items:end; justify-content:space-between; gap:2rem; }
.nc-news-section__head h2 { margin:.1rem 0 0; color:var(--nc-home-navy); font-size:clamp(1.9rem,3.8vw,2.9rem); letter-spacing:-.035em; }
.nc-news-section__head p { max-width:690px; margin:.45rem 0 0; color:#647983; line-height:1.6; }
.nc-news-section__head > a { flex:0 0 auto; font-weight:850; text-decoration:none; }
.nc-news-kicker { margin:0; color:var(--nc-home-green); font-size:.72rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.nc-news-civic-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(300px,.5fr); gap:1rem; align-items:start; }
.nc-news-civic-grid .civic-engine-experience { margin:0; }
.nc-news-civic-sidebar { display:grid; gap:1rem; }
.nc-news-tool-card { padding:1.2rem; border:1px solid var(--nc-home-border); border-radius:18px; background:#fff; box-shadow:0 10px 28px rgba(24,58,77,.05); }
.nc-news-tool-card h3 { margin:0 0 .45rem; color:var(--nc-home-navy); font-size:1.12rem; }
.nc-news-tool-card p { margin:.35rem 0 .85rem; color:#647983; font-size:.9rem; line-height:1.55; }
.nc-news-tool-card a { font-weight:850; }
.nc-news-events-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,.42fr); gap:1.2rem; align-items:start; }
.nc-news-events-panel { padding:1.2rem 1.3rem; border:1px solid var(--nc-home-border); border-radius:20px; background:#fff; box-shadow:0 12px 30px rgba(24,58,77,.05); }
.nc-news-source-note { padding:1.25rem; border-radius:18px; background:#eaf4f6; }
.nc-news-source-note h3 { margin:0 0 .45rem; color:var(--nc-home-navy); }
.nc-news-source-note p { margin:0; color:#58717d; line-height:1.55; }
.nc-news-docs { padding:clamp(1.4rem,3vw,2rem); border:1px solid var(--nc-home-border); border-radius:20px; background:#fff; }
.nc-news-page .nc-home-stories { grid-template-columns:minmax(0,1.25fr) repeat(2,minmax(220px,.75fr)); }
.nc-news-page .nc-home-stories--count-1 { grid-template-columns:1fr; }
.nc-news-page .nc-home-stories--count-1 .nc-home-story { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(0,1.15fr); }
.nc-news-page .nc-home-stories--count-1 .nc-home-story__media { aspect-ratio:auto; min-height:300px; }

@media (max-width:900px) {
  .nc-news-hero,.nc-news-civic-grid,.nc-news-events-grid { grid-template-columns:1fr; }
  .nc-news-hero h1 { max-width:none; }
  .nc-news-page .nc-home-stories { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .nc-news-page .nc-home-story.is-featured { grid-column:1/-1; }
  .nc-news-page .nc-home-stories--count-1 .nc-home-story { grid-template-columns:1fr; }
}
@media (max-width:640px) {
  .nc-news-page { gap:1.75rem; }
  .nc-news-hero { margin-inline:calc(50% - 50vw); grid-template-columns:1fr; padding:2.3rem 1rem 2rem; border-radius:0; }
  .nc-news-hero h1 { font-size:clamp(2.55rem,13vw,3.7rem); }
  .nc-news-topic-nav { margin-inline:-.1rem; }
  .nc-news-section--band { padding-inline:1rem; }
  .nc-news-section__head { align-items:start; flex-direction:column; gap:.55rem; }
  .nc-news-page .nc-home-stories { grid-template-columns:1fr; }
  .nc-news-page .nc-home-story.is-featured { grid-column:auto; }
  .nc-news-events-panel,.nc-news-docs,.nc-news-tool-card { border-radius:16px; }
}


/* ==========================================================
   Niles Connect 4.6 - reusable layout stabilization
   News & Events fixes are intentionally component-level so
   subsequent page builds can reuse the same grid behavior.
   ========================================================== */

/* Topic navigation is a true wrapping taxonomy bar on desktop. */
.nc-news-topic-nav {
  flex-wrap: wrap;
  overflow: visible;
  align-items: center;
  row-gap: .55rem;
}

/* Grid children must size to their own content, never to a neighboring column. */
.nc-news-civic-grid,
.nc-news-events-grid {
  align-items: start;
}
.nc-news-civic-grid > *,
.nc-news-events-grid > * {
  min-width: 0;
  min-height: 0;
  align-self: start;
}
.nc-news-civic-sidebar {
  align-self: start;
  align-content: start;
  grid-auto-rows: max-content;
}
.nc-news-civic-sidebar > * {
  min-height: 0;
  height: auto;
  align-self: start;
}

/* The homepage spotlight has a two-column feature layout. Inside a narrow
   editorial sidebar it must collapse to compact one-column items. */
.nc-news-civic-sidebar .nc-home-civic-spotlight {
  grid-template-columns: 1fr;
  gap: .7rem;
}
.nc-news-civic-sidebar .nc-home-civic-item,
.nc-news-civic-sidebar .nc-home-civic-item.is-featured {
  grid-row: auto;
  min-height: 0;
  padding: .9rem;
  border-radius: 14px;
  box-shadow: none;
}
.nc-news-civic-sidebar .nc-home-civic-item.is-featured h3,
.nc-news-civic-sidebar .nc-home-civic-item h3 {
  margin: .5rem 0 .35rem;
  font-size: 1rem;
}
.nc-news-civic-sidebar .nc-home-civic-item p {
  margin: .35rem 0;
  font-size: .84rem;
  line-height: 1.45;
}
.nc-news-civic-sidebar .nc-home-civic-source,
.nc-news-civic-sidebar .nc-home-civic-meta {
  font-size: .76rem;
}

/* Keep editorial bands compact when feeds or document collections are short. */
.nc-news-section--band {
  min-height: 0;
}
.nc-news-docs .ncvri-empty,
.nc-news-docs .civic-engine-empty,
.nc-news-docs > p:only-child {
  margin: .75rem 0 0;
}
.nc-news-docs:has(.ncvri-empty),
.nc-news-docs:has(.civic-engine-empty) {
  padding-block: 1.2rem;
}

/* More consistent vertical rhythm for page-owned layouts. */
.nc-news-page {
  gap: clamp(1.75rem, 3.2vw, 2.75rem);
}
.nc-news-section {
  gap: .85rem;
}
.nc-news-section--band {
  padding-block: clamp(1.8rem, 3.2vw, 2.7rem);
}
.nc-news-source-note:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .nc-news-topic-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .45rem;
  }
  .nc-news-topic-nav a {
    min-height: 42px;
  }
  .nc-news-civic-sidebar .nc-home-civic-spotlight {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 640px) {
  .nc-news-page {
    gap: 1.5rem;
  }
  .nc-news-topic-nav {
    margin-inline: -1rem;
    padding-inline: 1rem;
  }
  .nc-news-civic-sidebar .nc-home-civic-spotlight {
    grid-template-columns: 1fr;
  }
  .nc-news-section--band {
    padding-block: 1.6rem;
  }
  .nc-news-tool-card,
  .nc-news-events-panel,
  .nc-news-docs,
  .nc-news-source-note {
    padding: 1rem;
  }
}

/* 4.7.0 Footer information architecture */
.nc-footer-managed-menu > .nc-footer-menu {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:28px;
}
.nc-footer-managed-menu > .nc-footer-menu > li { margin:0; min-width:0; }
.nc-footer-managed-menu > .nc-footer-menu > li > a {
  display:inline-block;
  margin:0 0 12px;
  color:#fff;
  font-size:.85rem;
  font-weight:850;
  letter-spacing:.09em;
  line-height:1.3;
  text-transform:uppercase;
}
.nc-footer-managed-menu > .nc-footer-menu > li > .sub-menu {
  display:block;
  position:static;
  width:auto;
  min-width:0;
  padding:0;
  margin:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  opacity:1;
  visibility:visible;
  transform:none;
}
.nc-footer-managed-menu > .nc-footer-menu > li > .sub-menu li { margin:.42rem 0; }
.nc-footer-managed-menu > .nc-footer-menu > li > .sub-menu a {
  display:inline;
  padding:0;
  color:#d7e4ea;
  font-size:.94rem;
  font-weight:500;
  line-height:1.45;
}
.nc-footer-managed-menu > .nc-footer-menu > li > .sub-menu a:hover,
.nc-footer-managed-menu > .nc-footer-menu > li > .sub-menu a:focus-visible { color:#fff; text-decoration:underline; }
.nc-footer-managed-menu a:focus-visible,
.nc-footer-share:focus-visible,
.nc-footer-logo:focus-visible { outline:3px solid currentColor; outline-offset:4px; border-radius:3px; }

@media (max-width:960px) {
  .nc-footer-managed-menu > .nc-footer-menu { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .nc-footer-managed-menu > .nc-footer-menu { grid-template-columns:1fr; gap:24px; }
  .nc-footer-managed-menu > .nc-footer-menu > li { padding-bottom:20px; border-bottom:1px solid rgba(255,255,255,.12); }
  .nc-footer-managed-menu > .nc-footer-menu > li:last-child { padding-bottom:0; border-bottom:0; }
}

/* 4.7.3 Header submenu usability + footer legal line refinement */
@media (min-width:1021px) {
  /* Remove the hover dead-zone between a parent item and its dropdown. */
  .main-navigation .menu-item-has-children > .sub-menu {
    top:calc(100% - 2px);
    min-width:240px;
    padding:10px;
  }

  /* Give submenu targets a larger, easier mouse target. */
  .main-navigation .sub-menu li {
    width:100%;
  }
  .main-navigation .sub-menu a {
    width:100%;
    min-height:42px;
    padding:.7rem .78rem;
    border-radius:9px;
    line-height:1.25;
  }

  /* Invisible hover bridge protects pointer travel at the menu edge. */
  .main-navigation .menu-item-has-children::after {
    content:"";
    position:absolute;
    z-index:99;
    left:0;
    right:0;
    top:100%;
    height:8px;
  }

  /* Keep the independence statement on one line on normal desktop widths. */
  .nc-footer-bottom {
    flex-wrap:nowrap;
    gap:14px;
    font-size:.76rem;
  }
  .nc-footer-bottom span:first-child {
    flex:0 0 auto;
    white-space:nowrap;
  }
  .nc-footer-bottom span:last-child {
    flex:0 1 auto;
    max-width:none;
    white-space:nowrap;
    text-align:right;
  }
}

/* At narrower widths, readability matters more than forcing one line. */
@media (max-width:1020px) {
  .nc-footer-bottom {
    flex-wrap:wrap;
  }
  .nc-footer-bottom span:last-child {
    max-width:none;
    white-space:normal;
  }
}
