/* Klema default church theme */
:root {
  --brand: #1f4b99;
  --accent: #d9a441;
  --ink: #1c1d21;
  --ink-soft: #4b4f58;
  --muted: #6d717b;
  --line: #e7e3dc;
  --paper: #fffdf9;
  --tint: #f6f2ea;
  --radius: 18px;
  --radius-lg: 26px;
  --btn-radius: 999px;
  --heading-weight: 600;
  --surface: #ffffff;
  --header-bg: color-mix(in srgb, var(--paper) 88%, transparent);
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 8px 24px rgba(20, 20, 30, .06);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --brand-ink: color-mix(in srgb, var(--brand) 70%, black);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, white);
  --on-brand: #fff;
  --on-accent: #1c1608;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--heading-weight); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }
.container--mid { max-width: 940px; }
.container--wide { max-width: 1180px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.link { font-weight: 600; text-decoration: none; color: var(--brand); }
.link:hover { text-decoration: underline; }

/* Buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: var(--btn-radius); font-weight: 600; font-size: .98rem; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s; cursor: pointer; line-height: 1.1; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-ink); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--light { background: #fff; color: var(--brand-ink); }
.btn--outline-light { border-color: rgba(255,255,255,.75); color: #fff; background: rgba(255,255,255,.06); backdrop-filter: blur(6px); }
.hero:not(.has-image) .btn--outline-light { border-color: var(--brand); color: var(--brand); }
.btn--sm { padding: .6em 1.1em; font-size: .9rem; }
.btn--lg { padding: 1em 2em; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 38px; height: 38px; border-radius: 11px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.brand__mark svg { width: 22px; height: 22px; }
.brand__logo { height: 40px; width: auto; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.site-nav a:not(.btn):hover, .site-nav a.is-active { color: var(--ink); background: var(--tint); }
.site-nav a, .site-nav__cta { white-space: nowrap; }
.site-nav__cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; border-radius: 2px; transition: .2s; }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 24px 20px; display: none; }
  .site-nav.is-open { display: flex; }
  .site-nav__cta { margin: 8px 0 0; }
}

/* Sections */
.section { padding: 88px 0; }
.section--tint { background: var(--tint); }
.block + .block .section:not(.section--tint) { padding-top: 72px; }
.section-title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section-intro { color: var(--ink-soft); max-width: 640px; margin: -4px auto 40px; font-size: 1.1rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head .section-title { margin: 0; }
.grid { display: grid; gap: 28px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Hero */
.hero { position: relative; display: flex; align-items: center; color: #fff; overflow: hidden; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 40%, #120d1f)); isolation: isolate; }
.hero--full { min-height: calc(100vh - 72px); min-height: calc(100svh - 72px); }
.hero--large { min-height: 620px; }
.hero--medium { min-height: 420px; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 12, 24, .25), rgba(10, 12, 24, .62)); }
.hero__inner { padding-top: 80px; padding-bottom: 80px; }
.hero--center .hero__inner { text-align: center; }
.hero--center .hero__sub { margin-left: auto; margin-right: auto; }
.hero--center .hero__actions { justify-content: center; }
.hero__title { font-size: clamp(2.6rem, 6.4vw, 5rem); font-weight: 600; margin-bottom: .3em; text-wrap: balance; }
.hero__sub { font-size: clamp(1.1rem, 1.8vw, 1.35rem); max-width: 640px; opacity: .92; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; border: 1px solid rgba(0,0,0,.04); }
a.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(20,20,30,.05), 0 18px 40px rgba(20,20,30,.12); }
.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--tint); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { width: 100%; height: 100%; min-height: 120px; background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--accent) 25%, white)); }
.card__body { padding: 22px 24px 26px; flex: 1; }
.card__body p { color: var(--ink-soft); margin-bottom: .8em; }
.card__title { font-size: 1.3rem; margin-bottom: .35em; }
.card__meta { color: var(--muted); font-size: .9rem; }
.play { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--brand); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.play svg { width: 20px; height: 20px; margin-left: 2px; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--right .split__media { order: 2; }
.split__media img, .split__placeholder { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; width: 100%; object-fit: cover; box-shadow: var(--shadow); }
.event-detail { align-items: start; grid-template-columns: 1.6fr 1fr; }
@media (max-width: 860px) { .split, .event-detail { grid-template-columns: 1fr; gap: 36px; } .split--right .split__media { order: 0; } }

/* Prose */
.prose { font-size: 1.08rem; color: var(--ink-soft); }
.prose h2 { font-size: 1.9rem; color: var(--ink); margin-top: 1.4em; }
.prose h3 { font-size: 1.4rem; color: var(--ink); margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.5em 0; padding: .2em 0 .2em 1.2em; font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.prose a { color: var(--brand); }
.prose strong { color: var(--ink); }

/* Service times */
.times-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.time-card { background: var(--surface); border-radius: var(--radius); padding: 28px 34px; min-width: 210px; text-align: center; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.time-card__day { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--muted); }
.time-card__time { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--brand-ink); margin: 6px 0 2px; }
.time-card__label { color: var(--ink-soft); }
.times-address { margin-top: 32px; }

/* CTA */
.cta { padding: 72px 0; }
.cta--brand { background: var(--brand); color: var(--on-brand); }
.cta--dark { background: #15161b; color: #fff; }
.cta--light { background: var(--brand-soft); color: var(--ink); }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta__title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .25em; }
.cta p { margin: 0; opacity: .9; font-size: 1.1rem; }

/* Scripture */
.scripture { text-align: center; margin: 0 auto; }
.scripture__mark { width: 44px; height: 44px; color: var(--accent); margin: 0 auto 14px; }
.scripture blockquote { margin: 0 0 20px; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.35; color: var(--ink); text-wrap: balance; }
.scripture figcaption { font-weight: 600; letter-spacing: .04em; color: var(--brand); }

/* Events */
.event-list { display: grid; gap: 14px; }
.event-row { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 18px 24px 18px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.event-row:hover { transform: translateX(4px); }
.event-row h3 { font-size: 1.25rem; margin: 0 0 4px; }
.event-row p { margin: 6px 0 0; color: var(--ink-soft); font-size: .95rem; }
.event-row__meta { color: var(--muted); font-size: .92rem; }
.event-row__arrow { font-size: 1.4rem; color: var(--brand); }
.datebadge { width: 68px; height: 72px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.datebadge__mon { font-size: .74rem; font-weight: 700; letter-spacing: .12em; }
.datebadge__day { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1; }
@media (max-width: 600px) { .event-row { grid-template-columns: auto 1fr; } .event-row__arrow { display: none; } }

/* People */
.person { text-align: center; }
.person__photo { width: 148px; height: 148px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; box-shadow: var(--shadow); }
.person__photo--initials { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--accent))); color: #fff; font-family: var(--serif); font-size: 2.6rem; font-weight: 600; }
.person__name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.person__role { color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.person__bio { color: var(--ink-soft); font-size: .95rem; }
.speaker { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.speaker .person { display: grid; grid-template-columns: 96px 1fr; text-align: left; column-gap: 20px; align-items: center; }
.speaker .person__photo { width: 96px; height: 96px; margin: 0; grid-row: span 3; font-size: 1.8rem; }

/* Gallery & video */
.gallery { columns: 3 260px; column-gap: 18px; }
.gallery figure { margin: 0 0 18px; break-inside: avoid; }
.gallery img { border-radius: 14px; width: 100%; }
.gallery figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); margin-bottom: 28px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video--empty { display: grid; place-items: center; color: #aaa; background: #1b1c22; }
.audio { display: flex; align-items: center; gap: 16px; background: var(--tint); border-radius: 14px; padding: 14px 18px; margin-bottom: 28px; font-weight: 600; }
.audio audio { flex: 1; }

/* Giving */
.giving { padding: 96px 0; background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 55%), linear-gradient(160deg, color-mix(in srgb, var(--brand) 85%, black), var(--brand)); color: var(--on-brand); text-align: center; }
.giving__icon { width: 44px; height: 44px; color: var(--accent); margin: 0 auto 18px; }
.giving p { font-size: 1.15rem; opacity: .9; max-width: 560px; margin: 0 auto 28px; }

/* Visit */
.visit { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.visit__address { white-space: pre-line; font-family: var(--serif); font-size: 1.5rem; margin: 18px 0 24px; color: var(--ink); }
.visit__card { background: var(--surface); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); }
.visit__card h3 { font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.visit__card h3:not(:first-child) { margin-top: 22px; }
.visit__card .person { text-align: left; }
.visit__card .person__photo { width: 64px; height: 64px; margin: 0 0 10px; font-size: 1.3rem; }
.times { list-style: none; margin: 0; padding: 0; }
.times li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.times li:last-child { border-bottom: 0; }
.times em { color: var(--muted); font-style: normal; font-size: .92rem; }
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }

/* Page heads & detail heroes */
.page-head { padding: 88px 0 56px; background: linear-gradient(180deg, var(--tint), var(--paper)); }
.page-head h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.page-head .lead { max-width: 640px; }
.page-head--center { text-align: center; padding: 140px 0; }
.page-head--center .lead { margin: 0 auto 28px; }
.detail-hero { position: relative; color: #fff; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 40%, #120d1f)); padding: 96px 0 72px; overflow: hidden; isolation: isolate; }
.detail-hero.has-image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,12,24,.35), rgba(10,12,24,.75)); }
.detail-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 900px; }
.detail-hero .lead { color: rgba(255,255,255,.88); max-width: 680px; }
.detail-hero .eyebrow { color: var(--accent); }
.back { color: rgba(255,255,255,.8); text-decoration: none; font-weight: 500; display: inline-block; margin-bottom: 26px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: rgba(255,255,255,.88); }
.detail-meta span + span::before { content: "·"; margin-right: 22px; opacity: .6; }

/* Chips & pagination */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.chip { padding: 8px 16px; border-radius: var(--btn-radius); border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .92rem; background: var(--surface); }
.chip.is-active, .chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; color: var(--muted); }
.pagination a { font-weight: 600; text-decoration: none; }

/* Footer */
.site-footer { background: #15161b; color: #c9cad1; padding: 72px 0 28px; font-size: .95rem; }
.site-footer a:not(.btn) { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h3 { font-family: var(--sans); color: #fff; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer__name { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.site-footer__text { max-width: 340px; }
.site-footer .times li { border-color: #2a2b33; }
.site-footer .address { white-space: pre-line; margin-bottom: 6px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.social { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.site-footer__bottom { border-top: 1px solid #2a2b33; margin-top: 48px; padding-top: 22px; color: #8b8d96; font-size: .85rem; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } .section { padding: 64px 0; } .hero__inner { padding-top: 56px; padding-bottom: 56px; } }

/* Live editor affordances (only inside the editor iframe) */
.empty-page { min-height: 60vh; display: grid; place-items: center; text-align: center; color: var(--muted); border: 2px dashed var(--line); margin: 40px; border-radius: 20px; }
body.is-editing [data-cms-block] { position: relative; }
body.is-editing [data-cms-block]::after { content: ""; position: absolute; inset: 0; pointer-events: none; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .12s; z-index: 5; }
body.is-editing [data-cms-block]:hover::after { outline-color: color-mix(in srgb, #6c5ce7 55%, transparent); }
body.is-editing [data-cms-block].cms-selected::after { outline: 2px solid #6c5ce7; }
body.is-editing [data-cms-edit]:not(.btn) { border-radius: 4px; }
body.is-editing [data-cms-edit] { cursor: text; transition: box-shadow .12s, background .12s; }
body.is-editing [data-cms-edit]:hover { box-shadow: 0 0 0 2px rgba(108, 92, 231, .45); }
body.is-editing [data-cms-edit]:focus { outline: none; box-shadow: 0 0 0 2px #6c5ce7; background: rgba(108, 92, 231, .06); }
body.is-editing [data-cms-edit]:empty::before { content: "Click to add text…"; opacity: .5; font-style: italic; }
body.is-editing img[data-cms-type="upload"], body.is-editing div[data-cms-type="upload"] { cursor: pointer; }
.cms-toolbar { position: absolute; top: 10px; right: 10px; z-index: 30; display: flex; gap: 2px; background: #1d1b2e; color: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font: 500 12px/1 var(--sans); opacity: 0; transform: translateY(-4px); transition: .12s; pointer-events: none; }
[data-cms-block]:hover > .cms-toolbar, .cms-selected > .cms-toolbar { opacity: 1; transform: none; pointer-events: auto; }
.cms-toolbar__label { padding: 7px 10px; opacity: .75; }
.cms-toolbar button { background: transparent; border: 0; color: #fff; padding: 6px 8px; border-radius: 7px; cursor: pointer; font: inherit; }
.cms-toolbar button:hover { background: rgba(255,255,255,.14); }
.cms-insert { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); z-index: 31; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #6c5ce7; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(108,92,231,.5); opacity: 0; transition: opacity .12s; }
[data-cms-block]:hover > .cms-insert { opacity: 1; }

/* ---- Section styles (the Style tab of each block) ------------------------
   Built from validated values in src/section_style.rs. Selectors are specific
   (and a few !important) so they beat every theme's defaults. */
.block { position: relative; }
.block[id] { scroll-margin-top: 96px; }
.block.s-bg { background: var(--s-bg, transparent); isolation: isolate; }
.block.s-bg > :not(.cms-toolbar, .cms-insert) { background: transparent !important; }
.block.s-bg-image { background-image: var(--s-img); background-size: cover; background-position: var(--s-pos, center); }
.block.s-bg-image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--s-ov-color, #000); opacity: var(--s-ov, .4); border-radius: inherit; pointer-events: none; }
.block.s-bg-fixed { background-attachment: fixed; }
@media (hover: none) { .block.s-bg-fixed { background-attachment: scroll; } }
.block.s-pt > :not(.cms-toolbar, .cms-insert) { padding-top: var(--s-pt) !important; }
.block.s-pb > :not(.cms-toolbar, .cms-insert) { padding-bottom: var(--s-pb) !important; }
.block.s-sp .container { padding-left: var(--s-sp) !important; padding-right: var(--s-sp) !important; }
.block.s-w .container { max-width: var(--s-w) !important; }
.block.s-mh > :not(.cms-toolbar, .cms-insert) { min-height: var(--s-mh); display: flex; flex-direction: column; justify-content: var(--s-va, center); box-sizing: border-box; }
.block.s-mh > :not(.cms-toolbar, .cms-insert) > :not(.cms-toolbar, .cms-insert) { width: 100%; }
.block.s-align-left, .block.s-align-left :is(.section-title, .section-intro, .scripture) { text-align: left; }
.block.s-align-center, .block.s-align-center :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: center; }
.block.s-align-right, .block.s-align-right :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: right; }
.block.s-align-center :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub, .section-title) { margin-left: auto; margin-right: auto; }
.block.s-align-right :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub) { margin-left: auto; margin-right: 0; }
.block.s-align-center :is(.hero__actions, .section-head, .metro-head) { justify-content: center; }
.block.s-align-right :is(.hero__actions, .section-head, .metro-head) { justify-content: flex-end; }
.block.s-align-center .section-head, .block.s-align-center .metro-head { flex-direction: column; align-items: center; }

/* Text tone: re-point the theme's colour tokens inside the section. */
.block.s-tone-light {
  --ink: #ffffff; --ink-soft: rgba(255,255,255,.86); --muted: rgba(255,255,255,.7); --line: rgba(255,255,255,.2);
  --surface: rgba(255,255,255,.08); --paper: rgba(255,255,255,.1); --tint: rgba(255,255,255,.06); --header-bg: transparent;
  color: var(--ink);
}
.block.s-tone-dark {
  --ink: #111216; --ink-soft: rgba(17,18,22,.78); --muted: rgba(17,18,22,.6); --line: rgba(17,18,22,.14);
  --surface: rgba(255,255,255,.72); --paper: rgba(255,255,255,.55); --tint: rgba(17,18,22,.05);
  color: var(--ink);
}
.block.s-color { --ink: var(--s-color); --ink-soft: color-mix(in srgb, var(--s-color) 82%, transparent); --muted: color-mix(in srgb, var(--s-color) 65%, transparent); color: var(--s-color); }
.block.s-hs :is(h1, h2) { font-size: var(--s-hs) !important; }
.block.s-ts :is(p, li, .section-intro, .lead, .hero__sub, .metro-lead, .metro-hero__sub, .scripture blockquote) { font-size: var(--s-ts) !important; }

/* Extras */
.block.s-radius { border-radius: var(--s-r); overflow: hidden; }
.block.s-radius > :not(.cms-toolbar, .cms-insert) { border-radius: inherit; }
.block.s-inset { margin: 12px clamp(12px, 3vw, 40px); }
.block.s-border-top, .block.s-border-both { border-top: 1px solid var(--s-bc, var(--line)); }
.block.s-border-bottom, .block.s-border-both { border-bottom: 1px solid var(--s-bc, var(--line)); }
.block.s-border-box { border: 1px solid var(--s-bc, var(--line)); }
.block.s-shadow-soft { box-shadow: 0 1px 2px rgba(15,15,25,.06), 0 12px 32px rgba(15,15,25,.08); }
.block.s-shadow-strong { box-shadow: 0 4px 8px rgba(15,15,25,.1), 0 28px 64px rgba(15,15,25,.22); }

/* Entrance animations (only when site.js runs and motion is welcome). */
.anim-ready .block.s-anim { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.anim-ready .block.s-anim:not(.is-in) { opacity: 0; }
.anim-ready .block.s-anim-fade-up:not(.is-in) { transform: translateY(36px); }
.anim-ready .block.s-anim-zoom:not(.is-in) { transform: scale(.94); }
.anim-ready .block.s-anim-slide:not(.is-in) { transform: translateX(-48px); }
@media (prefers-reduced-motion: reduce) { .anim-ready .block.s-anim { opacity: 1 !important; transform: none !important; transition: none; } }
.block.s-tone-light :is(.link, a.event-row__arrow) { color: var(--ink); }
.block.s-tone-dark .link { color: var(--ink); }
.block.s-tone-light .time-card__time { color: var(--ink); }

/* A section set to a narrow width stacks its columns like it would on a phone. */
.block.s-narrow :is(.split, .visit, .event-detail, .metro-times__panel, .metro-feature, .metro-giving__grid,
  .modern-hero__grid, .modern-cards__head, .modern-feature, .sanctuary-hero__grid) { grid-template-columns: 1fr !important; gap: 32px !important; }

/* Gap, columns and side-by-side/stacked layout (desktop values apply everywhere
   unless a tablet or mobile value overrides them). */
.block.s-gap :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row, .split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { gap: var(--s-gap) !important; }
.block.s-gap .gallery { column-gap: var(--s-gap) !important; }
.block.s-cols :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row) { display: grid !important; grid-template-columns: repeat(var(--s-cols), minmax(0, 1fr)) !important; }
.block.s-cols :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row) > * { min-width: 0; }
.block.s-cols .gallery { columns: var(--s-cols) !important; }
.block:is(.s-layout-side, .s-layout-side-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; direction: ltr; }
.block:is(.s-layout-side, .s-layout-side-swap) .split--right .split__media { order: 2 !important; }
.block.s-layout-side-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { direction: rtl; }
.block.s-layout-side-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > * { direction: ltr; }
.block:is(.s-layout-stack, .s-layout-stack-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { grid-template-columns: minmax(0, 1fr) !important; direction: ltr; }
.block:is(.s-layout-stack, .s-layout-stack-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > * { order: 0 !important; }
.block.s-layout-stack-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > :first-child { order: 2 !important; }

/* Tablet (≤ 1024px) and mobile (≤ 760px) overrides from the Style tab's device
   switcher. Mobile falls back to tablet, tablet to desktop. */
@media (max-width: 1024px) {
  .block.s-t-pt > :not(.cms-toolbar, .cms-insert) { padding-top: var(--s-t-pt) !important; }
  .block.s-t-pb > :not(.cms-toolbar, .cms-insert) { padding-bottom: var(--s-t-pb) !important; }
  .block.s-t-sp .container { padding-left: var(--s-t-sp) !important; padding-right: var(--s-t-sp) !important; }
  .block.s-t-w .container { max-width: var(--s-t-w) !important; }
  .block.s-t-mh > :not(.cms-toolbar, .cms-insert) { min-height: var(--s-t-mh); display: flex; flex-direction: column; justify-content: var(--s-t-va, center); box-sizing: border-box; }
  .block.s-t-mh > :not(.cms-toolbar, .cms-insert) > :not(.cms-toolbar, .cms-insert) { width: 100%; }
  .block.s-t-va > :not(.cms-toolbar, .cms-insert) { justify-content: var(--s-t-va) !important; }
  .block.s-t-align-left, .block.s-t-align-left :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: left; }
  .block.s-t-align-left :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub, .section-title) { margin-left: 0; margin-right: auto; }
  .block.s-t-align-left :is(.hero__actions, .section-head, .metro-head) { justify-content: flex-start; }
  .block.s-t-align-center, .block.s-t-align-center :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: center; }
  .block.s-t-align-center :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub, .section-title) { margin-left: auto; margin-right: auto; }
  .block.s-t-align-center :is(.hero__actions, .section-head, .metro-head) { justify-content: center; }
  .block.s-t-align-right, .block.s-t-align-right :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: right; }
  .block.s-t-align-right :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub) { margin-left: auto; margin-right: 0; }
  .block.s-t-align-right :is(.hero__actions, .section-head, .metro-head) { justify-content: flex-end; }
  .block.s-t-hs :is(h1, h2) { font-size: var(--s-t-hs) !important; }
  .block.s-t-ts :is(p, li, .section-intro, .lead, .hero__sub, .metro-lead, .metro-hero__sub, .scripture blockquote) { font-size: var(--s-t-ts) !important; }
  .block.s-t-gap :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row, .split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { gap: var(--s-t-gap) !important; }
  .block.s-t-gap .gallery { column-gap: var(--s-t-gap) !important; }
  .block.s-t-cols :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row) { display: grid !important; grid-template-columns: repeat(var(--s-t-cols), minmax(0, 1fr)) !important; }
  .block.s-t-cols :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row) > * { min-width: 0; }
  .block.s-t-cols .gallery { columns: var(--s-t-cols) !important; }
  .block:is(.s-t-layout-side, .s-t-layout-side-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; direction: ltr; }
  .block:is(.s-t-layout-side, .s-t-layout-side-swap) .split--right .split__media { order: 2 !important; }
  .block.s-t-layout-side-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { direction: rtl; }
  .block.s-t-layout-side-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > * { direction: ltr; }
  .block:is(.s-t-layout-stack, .s-t-layout-stack-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { grid-template-columns: minmax(0, 1fr) !important; direction: ltr; }
  .block:is(.s-t-layout-stack, .s-t-layout-stack-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > * { order: 0 !important; }
  .block.s-t-layout-stack-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > :first-child { order: 2 !important; }
}
@media (max-width: 760px) {
  .block.s-m-pt > :not(.cms-toolbar, .cms-insert) { padding-top: var(--s-m-pt) !important; }
  .block.s-m-pb > :not(.cms-toolbar, .cms-insert) { padding-bottom: var(--s-m-pb) !important; }
  .block.s-m-sp .container { padding-left: var(--s-m-sp) !important; padding-right: var(--s-m-sp) !important; }
  .block.s-m-w .container { max-width: var(--s-m-w) !important; }
  .block.s-m-mh > :not(.cms-toolbar, .cms-insert) { min-height: var(--s-m-mh); display: flex; flex-direction: column; justify-content: var(--s-m-va, center); box-sizing: border-box; }
  .block.s-m-mh > :not(.cms-toolbar, .cms-insert) > :not(.cms-toolbar, .cms-insert) { width: 100%; }
  .block.s-m-va > :not(.cms-toolbar, .cms-insert) { justify-content: var(--s-m-va) !important; }
  .block.s-m-align-left, .block.s-m-align-left :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: left; }
  .block.s-m-align-left :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub, .section-title) { margin-left: 0; margin-right: auto; }
  .block.s-m-align-left :is(.hero__actions, .section-head, .metro-head) { justify-content: flex-start; }
  .block.s-m-align-center, .block.s-m-align-center :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: center; }
  .block.s-m-align-center :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub, .section-title) { margin-left: auto; margin-right: auto; }
  .block.s-m-align-center :is(.hero__actions, .section-head, .metro-head) { justify-content: center; }
  .block.s-m-align-right, .block.s-m-align-right :is(.section-title, .section-intro, .scripture, .metro-lead, .hero__inner) { text-align: right; }
  .block.s-m-align-right :is(.section-intro, .metro-lead, .lead, .hero__sub, .metro-hero__sub) { margin-left: auto; margin-right: 0; }
  .block.s-m-align-right :is(.hero__actions, .section-head, .metro-head) { justify-content: flex-end; }
  .block.s-m-hs :is(h1, h2) { font-size: var(--s-m-hs) !important; }
  .block.s-m-ts :is(p, li, .section-intro, .lead, .hero__sub, .metro-lead, .metro-hero__sub, .scripture blockquote) { font-size: var(--s-m-ts) !important; }
  .block.s-m-gap :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row, .split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { gap: var(--s-m-gap) !important; }
  .block.s-m-gap .gallery { column-gap: var(--s-m-gap) !important; }
  .block.s-m-cols :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row) { display: grid !important; grid-template-columns: repeat(var(--s-m-cols), minmax(0, 1fr)) !important; }
  .block.s-m-cols :is(.grid, .modern-cards, .metro-cards__grid, .metro-sermons__more, .bold-sermons, .bold-times__grid, .event-list, .bold-events, .modern-rows, .metro-events__list, .times-grid, .sanctuary-times__row) > * { min-width: 0; }
  .block.s-m-cols .gallery { columns: var(--s-m-cols) !important; }
  .block:is(.s-m-layout-side, .s-m-layout-side-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; direction: ltr; }
  .block:is(.s-m-layout-side, .s-m-layout-side-swap) .split--right .split__media { order: 2 !important; }
  .block.s-m-layout-side-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { direction: rtl; }
  .block.s-m-layout-side-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > * { direction: ltr; }
  .block:is(.s-m-layout-stack, .s-m-layout-stack-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) { grid-template-columns: minmax(0, 1fr) !important; direction: ltr; }
  .block:is(.s-m-layout-stack, .s-m-layout-stack-swap) :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > * { order: 0 !important; }
  .block.s-m-layout-stack-swap :is(.split, .visit, .formblock, .event-detail, .modern-hero__grid, .sanctuary-hero__grid, .modern-feature, .metro-feature, .metro-times__panel, .metro-giving__grid) > :first-child { order: 2 !important; }
}

/* Visibility per device (exact ranges). In the editor hidden sections stay
   visible, faded, so they can still be edited. */
@media (min-width: 1025px) { .block.s-hide-d { display: none; } .is-editing .block.s-hide-d { display: block; opacity: .45; outline: 2px dashed rgba(120,120,140,.5); outline-offset: -2px; } }
@media (min-width: 761px) and (max-width: 1024px) { .block.s-hide-t { display: none; } .is-editing .block.s-hide-t { display: block; opacity: .45; outline: 2px dashed rgba(120,120,140,.5); outline-offset: -2px; } }
@media (max-width: 760px) { .block.s-hide-m { display: none; } .is-editing .block.s-hide-m { display: block; opacity: .45; outline: 2px dashed rgba(120,120,140,.5); outline-offset: -2px; } }
.block.s-narrow :is(.bold-sermons, .metro-sermons__more) { grid-template-columns: 1fr 1fr !important; }
.block.s-narrow .bold-sermon--wide { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 320px; }
.block.s-narrow .metro-feature__media { order: -1; }
.is-editing .block.s-radius { overflow: visible; }

/* ---- Events: toolbar, month calendar, add to calendar ---- */
.events-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.events-bar .chips { margin: 0; }
.events-bar__feed { display: flex; gap: 8px; align-items: center; font-size: .92rem; flex-wrap: wrap; }
.event-repeat { color: var(--muted); font-size: .92em; }
.btn--outline { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--sm { padding: .55em 1em; font-size: .88rem; }
.add-cal { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 20px; }
.cal { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cal__nav strong { font-family: var(--serif); font-size: 1.25rem; font-weight: var(--heading-weight); }
.cal__step { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.cal__step:hover { background: var(--tint); }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__wd { padding: 10px 8px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.cal__day { min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal__day:nth-child(7n) { border-right: 0; }
.cal__day.is-out { background: var(--tint); }
.cal__day.is-out .cal__num { opacity: .45; }
.cal__long { display: none; }
.cal__num { font-size: .85rem; font-weight: 600; color: var(--ink-soft); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal__day.is-today .cal__num { background: var(--brand); color: var(--on-brand); }
.cal__event { display: block; font-size: .78rem; line-height: 1.3; padding: 4px 6px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal__event:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.cal__time { font-weight: 700; color: var(--brand); }
@media (max-width: 760px) {
  .cal__grid { grid-template-columns: 1fr; }
  .cal__wd, .cal__day.is-out:not(.has-events), .cal__day:not(.has-events) { display: none; }
  .cal__day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; padding: 10px 14px; gap: 8px; }
  .cal__day .cal__num { display: none; }
  .cal__long { display: block !important; font-weight: 700; font-size: .9rem; }
  .cal__event { white-space: normal; font-size: .9rem; flex: 1 1 100%; }
}

/* Forms */
.formblock { display: grid; grid-template-columns: 1fr 1.35fr; gap: 56px; align-items: start; }
.formblock--solo { grid-template-columns: 1fr; max-width: 760px; }
.formblock__box, .signup .sform-wrap { background: var(--surface); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04); }
.sform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.sform__q { grid-column: 1 / -1; display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sform__q--half { grid-column: span 1; }
.sform__q[hidden] { display: none; }
.sform__label { font-weight: 600; font-size: .92rem; padding: 0; }
.sform__req { color: var(--brand); margin-left: 3px; }
.sform__help { color: var(--muted); font-size: .86rem; }
.sform input:not([type=checkbox]):not([type=radio]):not([type=file]), .sform textarea, .sform select { font: inherit; font-size: 1rem; color: inherit; background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; box-sizing: border-box; }
.sform select { appearance: auto; }
.sform textarea { resize: vertical; min-height: 120px; }
.sform input[type=file] { font: inherit; font-size: .95rem; }
.sform input:focus, .sform textarea:focus, .sform select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.sform__choices { display: grid; gap: 8px; }
.sform__choice { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; line-height: 1.45; cursor: pointer; }
.sform__choice input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.sform__section { grid-column: 1 / -1; padding-top: 6px; }
.sform__section h3 { margin: 0 0 4px; font-size: 1.2rem; }
.sform__section p { margin: 0; color: var(--ink-soft); }
.sform__err { color: #b42318; font-size: .88rem; font-weight: 500; }
.sform__err:empty { display: none; }
.sform__q.has-error input:not([type=checkbox]):not([type=radio]), .sform__q.has-error textarea, .sform__q.has-error select { border-color: #d92d20; }
.sform__top-err { background: #fdecea; color: #8a1c12; padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; }
.sform__note { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .9rem; margin: 20px 0 0; }
.sform__note svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.sform .btn { margin-top: 20px; }
.sform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sform__msg { display: none; margin: 0 0 18px; padding: 14px 16px; border-radius: 10px; scroll-margin-top: 140px; white-space: pre-line; }
.sform__msg:target, .sform__msg.is-shown { display: block; }
.sform__msg--ok { background: color-mix(in srgb, var(--brand) 10%, transparent); padding: 22px; font-size: 1.05rem; }
.sform__msg--err { background: #fdecea; color: #8a1c12; }
.sform-wrap:has(.sform__msg--ok:target) .sform { display: none; }
.sform__closed { margin: 0; padding: 16px; border-radius: 10px; background: var(--tint, #f6f2ea); color: var(--ink-soft); }
.signup { margin-top: 40px; scroll-margin-top: 100px; }
.signup h2 { margin-bottom: 6px; }
.signup__meta { color: var(--ink-soft); margin: 0 0 18px; }
@media (max-width: 860px) {
  .formblock { grid-template-columns: 1fr; gap: 24px; }
  .formblock__box, .signup .sform-wrap { padding: 22px 20px; }
  .sform__grid { grid-template-columns: 1fr; }
  .sform__q--half { grid-column: 1 / -1; }
}
