:root {
    --msct-navy: #0a2472;
    --msct-deep: #061842;
    --msct-ink: #15171a;
    --msct-muted: #5f6670;
    --msct-rule: #d9dde4;
    --msct-paper: #ffffff;
    --msct-wash: #f4f6f9;
    --msct-gold: #c6a866;
    --msct-shell: 1380px;
}

.msct-council,
.msct-council * { box-sizing: border-box; }

.msct-council {
    background: var(--msct-paper);
    color: var(--msct-ink);
    overflow: clip;
}

.msct-shell {
    width: min(calc(100% - 40px), var(--msct-shell));
    margin-inline: auto;
}

.msct-hero {
    min-height: clamp(340px, 46vw, 630px);
    position: relative;
    display: flex;
    align-items: flex-end;
    background: linear-gradient(135deg, var(--msct-deep), var(--msct-navy));
    isolation: isolate;
}

.msct-hero.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--msct-hero-image);
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.msct-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4,11,31,.08) 10%, rgba(4,11,31,.28) 48%, rgba(4,11,31,.88) 100%);
    z-index: -1;
}

.msct-hero-inner {
    padding-block: clamp(70px, 10vw, 138px) clamp(38px, 6vw, 76px);
    color: #fff;
}

.msct-kicker,
.msct-section-label,
.msct-update-date {
    font-family: "Source Sans 3", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-weight: 700;
}

.msct-kicker {
    margin: 0 0 12px;
    font-size: 13px;
    color: rgba(255,255,255,.82);
}

.msct-title {
    margin: 0;
    max-width: 1100px;
    color: #fff;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(48px, 8vw, 104px);
    font-weight: 600;
    line-height: .94;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.msct-deck {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255,255,255,.9);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.45;
}

.msct-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 410px);
    gap: clamp(42px, 6vw, 88px);
    align-items: start;
    padding-block: clamp(46px, 7vw, 92px);
}

.msct-profile { min-width: 0; }

.msct-section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    color: var(--msct-navy);
    font-size: 12px;
}

.msct-section-label::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--msct-rule);
}

.msct-entry {
    font-family: Merriweather, Georgia, serif;
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.78;
}

.msct-entry > p:first-of-type::first-letter {
    float: left;
    margin: .12em .1em 0 0;
    color: var(--msct-navy);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 4.25em;
    font-weight: 600;
    line-height: .72;
}

.msct-entry p { margin: 0 0 1.35em; }
.msct-entry h2 { margin: 2.1em 0 .55em; font-size: clamp(30px, 4vw, 46px); }
.msct-entry h3 { margin: 1.8em 0 .5em; font-size: clamp(24px, 3vw, 32px); }
.msct-entry a { color: var(--msct-navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.msct-entry img { border-radius: 2px; }

/* The template owns the map wrapper completely. Legacy WordPress figure,
   paragraph, alignment and intrinsic-width rules are removed by JavaScript, and
   these deliberately strong declarations prevent the theme from enlarging it. */
.msct-entry > .msct-council-map {
    float: right !important;
    display: block !important;
    clear: right !important;
    box-sizing: border-box !important;
    width: min(34%, 300px) !important;
    max-width: 300px !important;
    min-width: 220px !important;
    height: auto !important;
    margin: 4px 0 28px 36px !important;
    padding: 10px !important;
    background: #fff !important;
    border: 1px solid var(--msct-rule) !important;
    border-radius: 2px !important;
    box-shadow: 0 14px 36px rgba(12,31,70,.12) !important;
    line-height: 0 !important;
}

.msct-entry > .msct-council-map .msct-council-map-link {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 0 !important;
}

.msct-entry > .msct-council-map img.msct-council-map-image {
    float: none !important;
    display: block !important;
    clear: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-fit: contain !important;
}

.msct-entry > .msct-council-map + p {
    margin-top: 0 !important;
}

/* The advert plugin inserts its band inside the article content. JavaScript moves
   it into .msct-ad-bands so it can be centred against the full page. */
.msct-entry .msab-fullwidth-band {
    margin-top: clamp(52px, 7vw, 96px) !important;
}

.msct-ad-bands {
    width: 100%;
    clear: both;
}

.msct-ad-bands[hidden] {
    display: none !important;
}

.msct-ad-bands .msab-fullwidth-band {
    width: 100% !important;
    max-width: none !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    padding-left: clamp(18px, 4vw, 64px) !important;
    padding-right: clamp(18px, 4vw, 64px) !important;
}

.msct-ad-bands .msab-grid-wrap {
    width: 100% !important;
    max-width: 1380px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.msct-ad-bands .msab-grid {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.msct-updates {
    min-width: 0;
    border-left: 1px solid var(--msct-rule);
    padding-left: clamp(24px, 3vw, 42px);
}

.msct-updates-sticky {
    position: sticky;
    top: 28px;
}

.admin-bar .msct-updates-sticky { top: 60px; }

.msct-updates h2 {
    margin: 0 0 24px;
    color: var(--msct-ink);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.05;
}

.msct-update-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding-block: 20px;
    border-top: 1px solid var(--msct-rule);
}

.msct-update-card:first-child { border-top: 2px solid var(--msct-ink); }

.msct-update-image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--msct-wash);
}

.msct-update-image img,
.msct-image-placeholder {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.msct-update-copy { min-width: 0; }
.msct-update-date { margin: 0 0 6px; color: var(--msct-muted); font-size: 10px; }
.msct-update-copy h3 { margin: 0 0 7px; font-size: 19px; line-height: 1.18; }
.msct-update-copy h3 a { color: var(--msct-ink); text-decoration: none; }
.msct-update-copy h3 a:hover { color: var(--msct-navy); }
.msct-update-copy p:last-child { margin: 0; color: var(--msct-muted); font-size: 13px; line-height: 1.45; }

.msct-all-link {
    display: inline-flex;
    margin-top: 24px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--msct-navy);
    color: var(--msct-navy);
    font-family: "Source Sans 3", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.msct-no-updates {
    padding: 18px;
    background: var(--msct-wash);
    border-left: 3px solid var(--msct-navy);
}

@media (max-width: 980px) {
    .msct-main-grid { grid-template-columns: 1fr; }
    .msct-updates { border-left: 0; border-top: 1px solid var(--msct-rule); padding: 42px 0 0; }
    .msct-updates-sticky { position: static; }
    .msct-update-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 26px; }
}

@media (max-width: 680px) {
    .msct-shell { width: min(calc(100% - 28px), var(--msct-shell)); }
    .msct-hero { min-height: 410px; }
    .msct-title { font-size: clamp(42px, 15vw, 68px); }
    .msct-main-grid { padding-block: 42px 60px; }
    .msct-entry { font-size: 17px; line-height: 1.7; }
    .msct-entry > p:first-of-type::first-letter { font-size: 3.7em; }
    .msct-entry img.alignright:not(.msct-council-map-image),
    .msct-entry .alignright:not(.msct-council-map) img { float: none; width: 100%; max-width: 430px; margin: 0 auto 28px; display: block; }
    .msct-entry > .msct-council-map { float: none; width: min(100%, 330px); max-width: 330px; margin: 0 auto 30px; }
    .msct-update-list { grid-template-columns: 1fr; }
    .msct-update-card { grid-template-columns: 104px minmax(0, 1fr); }
}

@media print {
    .msct-updates, .msab-fullwidth-band { display: none !important; }
    .msct-hero { min-height: 0; background: #fff; }
    .msct-hero-shade, .msct-hero.has-image::before { display: none; }
    .msct-hero-inner, .msct-title, .msct-deck, .msct-kicker { color: #000; }
    .msct-main-grid { display: block; }
}


/* Keek regional website spotlight in the council hero */
.msct-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    gap: clamp(36px, 6vw, 90px);
    align-items: end;
}

.msct-hero-copy { min-width: 0; }

.msct-keek-spotlight {
    justify-self: end;
    width: 100%;
    max-width: 430px;
    color: #fff;
    text-align: left;
    padding: 20px 22px 18px;
    border-top: 1px solid rgba(255,255,255,.72);
    border-bottom: 1px solid rgba(255,255,255,.38);
    background: #03359b;
    box-shadow: 0 18px 46px rgba(2, 19, 64, .28);
}

.msct-keek-eyebrow {
    margin: 0 0 5px;
    font-family: var(--font-custom-1, Arial, sans-serif);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.78);
}

.msct-keek-spotlight h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(18px, 1.6vw, 23px);
    line-height: 1.18;
    font-weight: 600;
}

.msct-keek-viewport {
    position: relative;
    height: 72px;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,.22);
    border-bottom: 1px solid rgba(255,255,255,.22);
}

.msct-keek-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(105%);
    transition: transform .55s cubic-bezier(.22,.61,.36,1), opacity .45s ease;
}

.msct-keek-item.is-active {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.msct-keek-item.is-entering {
    visibility: visible;
    transform: translateY(105%);
}

.msct-keek-item.is-leaving {
    visibility: visible;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-105%);
}

.msct-keek-item a {
    display: block;
    width: 100%;
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.msct-keek-item strong,
.msct-keek-item span { display: block; }

.msct-keek-item strong {
    margin-bottom: 3px;
    font-family: var(--font-custom-1, Arial, sans-serif);
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.msct-keek-item span {
    color: rgba(255,255,255,.82);
    font-size: 13px;
    line-height: 1.35;
}

.msct-keek-item a:hover strong,
.msct-keek-item a:focus-visible strong { text-decoration: underline; }

.msct-keek-search {
    display: inline-block;
    margin-top: 11px;
    color: #fff !important;
    font-family: var(--font-custom-1, Arial, sans-serif);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,.65);
}

.msct-keek-search:hover,
.msct-keek-search:focus-visible { border-bottom-color: #fff; }

@media (max-width: 900px) {
    .msct-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .msct-keek-spotlight {
        justify-self: stretch;
        max-width: 100%;
    }
}

@media (max-width: 620px) {
    .msct-keek-spotlight { padding: 16px 17px 14px; }
    .msct-keek-viewport { height: 76px; }
}


/* Compact header placement safety */
.header56 .msct-keek-random,
.topbar56 .msct-keek-random,
.header_bottom56 .msct-keek-random {
    max-width: 255px;
}
.header56 .msct-keek-random-trigger,
.topbar56 .msct-keek-random-trigger,
.header_bottom56 .msct-keek-random-trigger {
    margin: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    .msct-keek-item { transition: none; }
}

/* Keek random website carnival shortcode */
.msct-keek-random,
.msct-keek-random * { box-sizing: border-box; }
.msct-keek-random {
    position: relative;
    z-index: 9990;
    width: min(255px, 100%);
    margin: 0 auto;
    font-family: var(--font-custom-1, Arial, sans-serif);
    line-height: 1.2;
}
.msct-keek-random-trigger {
    position: relative;
    display: grid;
    grid-template-columns: 21px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 7px;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 4px 13px 4px 10px;
    overflow: hidden;
    border: 2px solid #ffd86b !important;
    border-radius: 999px !important;
    background: #03359b !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.17), 0 3px 0 #001f68 !important;
    cursor: pointer;
    text-align: left;
}
.msct-keek-random-trigger:hover,
.msct-keek-random-trigger:focus-visible {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.24), 0 5px 0 #001f68 !important;
}
.msct-keek-random-lights {
    position: absolute;
    inset: 3px;
    border: 1px dotted rgba(255,255,255,.8);
    border-radius: inherit;
    pointer-events: none;
}
.msct-keek-random-star {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    color: #ffd86b;
    font-size: 19px;
    text-shadow: 0 0 8px rgba(255,216,107,.9);
}
.msct-keek-random-label {
    align-self: end;
    font-family: var(--font-heading, Georgia, serif);
    font-size: 14px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: .01em;
}
.msct-keek-random-sub {
    align-self: start;
    color: rgba(255,255,255,.82);
    font-size: 8px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.msct-keek-random-stage {
    position: absolute;
    top: calc(100% + 9px);
    left: 50%;
    width: min(390px, calc(100vw - 28px));
    transform: translateX(-50%);
    overflow: hidden;
    border: 3px solid #ffd86b;
    border-radius: 12px;
    background: #fff;
    color: #111;
    box-shadow: 0 16px 42px rgba(0,0,0,.35);
}
.msct-keek-random-stage[hidden] { display: none !important; }
.msct-keek-random-curtain {
    display: flex;
    justify-content: center;
    gap: 8px;
    min-height: 118px;
    align-items: center;
    background: repeating-linear-gradient(90deg, #03359b 0 38px, #082777 38px 76px);
    color: #fff;
}
.msct-keek-random-curtain span {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 56px;
    border: 2px solid #ffd86b;
    border-radius: 8px;
    background: #fff;
    color: #03359b;
    font-size: 35px;
    font-weight: 900;
    box-shadow: 0 5px 0 rgba(0,0,0,.22);
}
.msct-keek-random.is-spinning .msct-keek-random-star { animation: msct-keek-star 520ms linear infinite; }
.msct-keek-random.is-spinning .msct-keek-random-curtain span { animation: msct-keek-reel 420ms ease-in-out infinite alternate; }
.msct-keek-random.is-spinning .msct-keek-random-curtain span:nth-child(2) { animation-delay: 90ms; }
.msct-keek-random.is-spinning .msct-keek-random-curtain span:nth-child(3) { animation-delay: 180ms; }
.msct-keek-random.is-spinning .msct-keek-random-curtain span:nth-child(4) { animation-delay: 270ms; }
@keyframes msct-keek-star { to { transform: rotate(360deg); } }
@keyframes msct-keek-reel { from { transform: translateY(-14px) rotate(-4deg); } to { transform: translateY(14px) rotate(4deg); } }
.msct-keek-random-result { padding: 18px 20px 20px; }
.msct-keek-random-card { animation: msct-keek-reveal 420ms ease-out both; }
@keyframes msct-keek-reveal { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.msct-keek-random-kicker {
    margin: 0 0 5px;
    color: #03359b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.msct-keek-random-card h3 {
    margin: 0 0 7px !important;
    color: #111 !important;
    font-family: var(--font-heading, Georgia, serif) !important;
    font-size: 24px !important;
    line-height: 1.08 !important;
}
.msct-keek-random-card p {
    margin: 0 0 14px !important;
    color: #333 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
}
.msct-keek-random-domain { color: #666; font-size: 11px; word-break: break-all; }
.msct-keek-random-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.msct-keek-random-actions a,
.msct-keek-random-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}
.msct-keek-random-visit { border: 1px solid #03359b !important; background: #03359b !important; color: #fff !important; }
.msct-keek-random-again { border: 1px solid #03359b !important; background: #fff !important; color: #03359b !important; cursor: pointer; }
.msct-keek-random-error { margin: 0; padding: 18px; color: #650000; font-size: 14px; }
@media (max-width: 680px) {
    .msct-keek-random { width: min(245px, 100%); }
    .msct-keek-random-label { font-size: 13px; }
    .msct-keek-random-sub { font-size: 8px; }
}

/* Compact header placement safety */
.header56 .msct-keek-random,
.topbar56 .msct-keek-random,
.header_bottom56 .msct-keek-random {
    max-width: 255px;
}
.header56 .msct-keek-random-trigger,
.topbar56 .msct-keek-random-trigger,
.header_bottom56 .msct-keek-random-trigger {
    margin: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    .msct-keek-random *, .msct-keek-random *::before, .msct-keek-random *::after { animation: none !important; transition: none !important; }
}
