/* South Presbyterian Church — layout styles that go beyond what blocks can
   express on their own. Colours come from theme.json presets.

   v1.1.0: header modes (sticky / sticky-hide / static), "Section:" block
   styles, and self-realigning layouts (.sp-flow columns, grid commitments,
   header-height-aware offsets). */

:root{
  --sp-line: var(--wp--custom--line, rgba(45,42,104,.16));
  --sp-line-soft: var(--wp--custom--line-soft, rgba(45,42,104,.09));
  --sp-radius: var(--wp--custom--radius, 14px);
  --sp-shadow: var(--wp--custom--shadow, 0 1px 2px rgba(27,25,64,.05), 0 14px 36px -14px rgba(27,25,64,.22));
  --sp-header-h: 82px;          /* overwritten live by south-presby.js */
  --sp-col-min: 18rem;          /* a column narrower than this wraps to its own row */
  --sp-section-pad: clamp(0.875rem, 1.75vw, 1.25rem); /* top/bottom padding of every section */
  --sp-head-gap: clamp(1rem, 1.75vw, 1.25rem);      /* intro → content gap inside a section */
}

body{ -webkit-font-smoothing:antialiased; }
html{ scroll-behavior:smooth; scroll-padding-top:calc(var(--sp-header-h) + 1rem); }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

/* Tracked caps lifted from the logo's "PRESBYTERIAN CHURCH" */
.sp-caps{
  font-family: var(--wp--preset--font-family--montserrat) !important;
  font-weight:600 !important; text-transform:uppercase; letter-spacing:.18em;
}
.sp-kicker{ font-size:.8rem; color:var(--wp--preset--color--accent-4); margin-bottom:.5rem; }

/* ======================================================================
   Header — three modes
   The header Group sits inside <header class="wp-block-template-part">;
   the theme tags that wrapper .sp-header-shell on the server (inc/upgrade.php)
   and JS/CSS :has() do the same as back-ups. The SHELL is position:fixed
   (immune to overflow/transform on ancestors, which is what broke sticky on
   the live host) and <body> gets matching top padding (--sp-header-h, kept
   up to date by JS, sensible default without it). Mode comes from a
   "Header:" block style on the Group, else Appearance → Customize.
   ====================================================================== */
.sp-header{ position:static !important; top:auto !important; }

.sp-header-shell,
.wp-block-template-part:has(> .sp-header){
  position:fixed; left:0; right:0; z-index:30;
  top:var(--wp-admin--admin-bar--height, 0px);
  transition:transform .3s ease, box-shadow .25s ease;
}
body{ padding-top:var(--sp-header-h) !important; }

/* static: scrolls away with the page */
body.sp-header-mode-static .sp-header-shell:not(:has(> [class*="is-style-sp-header-"])),
body.sp-header-mode-static .wp-block-template-part:has(> .sp-header:not([class*="is-style-sp-header-"])),
.sp-header-shell:has(> .is-style-sp-header-static),
.wp-block-template-part:has(> .sp-header.is-style-sp-header-static){
  position:static;
}
body.sp-header-mode-static:not(:has(.sp-header[class*="is-style-sp-header-"])),
body:has(.sp-header.is-style-sp-header-static){ padding-top:0 !important; }

/* sticky-hide: tucks away when scrolling down, returns on scroll up */
.sp-header-shell[data-mode="sticky-hide"][data-hidden="true"]{ transform:translateY(-100%); box-shadow:none; }
.sp-header-shell[data-mode="sticky-hide"][data-scrolled="true"][data-hidden="false"]{ box-shadow:0 8px 24px -16px rgba(27,25,64,.35); }
@media (prefers-reduced-motion:reduce){ .sp-header-shell{ transition:none; } }

/* Header surface */
.sp-header{
  background:rgba(247,245,240,.86);
  backdrop-filter:saturate(1.4) blur(12px);
  -webkit-backdrop-filter:saturate(1.4) blur(12px);
  border-bottom:1px solid transparent;
  transition:border-color .25s ease, background .25s ease;
}
.sp-header[data-scrolled="true"]{ border-bottom-color:var(--sp-line); background:rgba(247,245,240,.97); }

.sp-header .wp-block-site-logo{ display:flex; align-items:center; margin:0; }
.sp-header .wp-block-site-logo img{ height:40px; width:auto; display:block; }
.sp-header .sp-header-row, .sp-header .sp-brand, .sp-header .sp-wordmark,
.sp-header .wp-block-navigation, .sp-header .wp-block-navigation__container,
.sp-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content{
  align-items:center !important;
}
.sp-header .sp-wordmark{ justify-content:center; }
.sp-header .wp-block-navigation .wp-block-buttons{ align-items:center; }
.sp-header .wp-block-site-title{ font-size:1.23rem !important; }
.sp-header .wp-block-navigation{ font-size:1.1rem !important; }
.sp-wordmark-sub{
  font-family:var(--wp--preset--font-family--montserrat); font-weight:600;
  font-size:.63rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--wp--preset--color--accent-3); line-height:1; margin:0;
}
.sp-header .wp-block-site-title{ line-height:1; margin:0; }
.sp-header .wp-block-site-title a{ text-decoration:none; color:var(--wp--preset--color--accent); }
.sp-header .wp-block-navigation a:not(.wp-block-button__link){ border-radius:8px; padding:.5rem .8rem; color:var(--wp--preset--color--contrast); transition:color .16s ease, background .16s ease; }
.sp-header .wp-block-navigation a:not(.wp-block-button__link):hover{ color:var(--wp--preset--color--accent); background:rgba(45,42,104,.06); }
/* The header CTA is a button inside the navigation block: keep its text white */
.sp-header .wp-block-navigation .wp-block-button__link,
.sp-header .wp-block-navigation .wp-block-button__link:hover,
.sp-header .wp-block-navigation .wp-block-button__link:focus{ color:#fff !important; }
.sp-header .wp-block-navigation__responsive-container.is-menu-open{ background:var(--wp--preset--color--base-2); }

/* ---------- Buttons ---------- */
.wp-block-button__link{ transition:transform .16s ease, background .16s ease, border-color .16s ease; box-shadow:0 1px 2px rgba(45,42,104,.22); }
.wp-block-button__link:hover{ transform:translateY(-1px); }
.is-style-outline .wp-block-button__link{
  border:1px solid var(--sp-line) !important; color:var(--wp--preset--color--accent) !important;
  background:transparent !important; box-shadow:none;
}
.is-style-outline .wp-block-button__link:hover{ border-color:var(--wp--preset--color--accent-3) !important; background:rgba(45,42,104,.04) !important; }
.sp-btn-sm .wp-block-button__link{ padding:.6rem 1.15rem; font-size:.99rem; }
@media (prefers-reduced-motion:reduce){ .wp-block-button__link:hover{ transform:none; } }

/* ---------- Hero ---------- */
.sp-hero{ position:relative; overflow:hidden; }
.sp-hero h1 em{ font-style:italic; color:var(--wp--preset--color--accent); }
.sp-hero .sp-lead{ color:var(--wp--preset--color--contrast); line-height:1.65; max-width:60ch; margin-inline:auto; }
.sp-hero-lockup img{ height:clamp(108px, 15vw, 148px); width:auto; }
.sp-hero-facts{
  border-top:1px solid var(--sp-line-soft);
  font-size:1rem; color:var(--wp--preset--color--contrast);
}
.sp-hero-facts strong{ color:var(--wp--preset--color--contrast); font-weight:500; }
.sp-hero-facts p{ margin:0; }

/* ======================================================================
   Sections — "Section:" block styles (Block → Styles on any Group)
   Each style sets background, text, heading, kicker, divider and link
   colours, so a section reads as its own band whatever is put inside it.
   ====================================================================== */
[class*="is-style-sp-section-"]{ position:relative; }
[class*="is-style-sp-section-"] .sp-kicker::before{
  content:""; display:inline-block; width:1.4rem; height:2px; margin:0 .6rem .22em 0;
  background:currentColor; vertical-align:middle; opacity:.9;
}

/* Cream — the page default, with a soft top rule */
.is-style-sp-section-cream{
  background:var(--wp--preset--color--base);
  color:var(--wp--preset--color--contrast);
  border-top:1px solid var(--sp-line-soft);
}

/* Paper — brighter card-like band */
.is-style-sp-section-paper,
.sp-band-paper{
  background:var(--wp--preset--color--base-2);
  color:var(--wp--preset--color--contrast);
  border-block:1px solid var(--sp-line-soft);
}

/* Navy wash — pale lavender, navy headings */
.is-style-sp-section-wash{
  background:var(--wp--preset--color--contrast-3);
  color:var(--wp--preset--color--contrast);
  border-block:1px solid var(--sp-line);
}
.is-style-sp-section-wash h1, .is-style-sp-section-wash h2, .is-style-sp-section-wash h3{ color:var(--wp--preset--color--accent); }
.is-style-sp-section-wash .sp-kicker{ color:var(--wp--preset--color--accent-3); }
.is-style-sp-section-wash .sp-commitments{ background:rgba(45,42,104,.18); border-color:rgba(45,42,104,.18); }
.is-style-sp-section-wash .sp-commitments > *{ background:var(--wp--preset--color--base-2); }
.is-style-sp-section-wash .sp-commitments > *:hover{ background:#fff; }
.is-style-sp-section-wash .is-style-outline .wp-block-button__link{ border-color:rgba(45,42,104,.3) !important; }

/* Brass accent — cream with a brass rule and brass headings' underline */
.is-style-sp-section-brass{
  background:var(--wp--preset--color--base);
  color:var(--wp--preset--color--contrast);
  border-top:3px solid var(--wp--preset--color--accent-4);
  background-image:linear-gradient(180deg, rgba(125,95,44,.07), transparent 180px);
}
.is-style-sp-section-brass .sp-kicker{ color:var(--wp--preset--color--accent-4); }
.is-style-sp-section-brass h2::after{
  content:""; display:block; width:3rem; height:2px; margin-top:.9rem;
  background:var(--wp--preset--color--accent-4);
}
.is-style-sp-section-brass h2.has-text-align-center::after{ margin-inline:auto; }

/* Navy — dark band, everything inverted */
.is-style-sp-section-navy{
  background:var(--wp--preset--color--accent-2);
  color:#fff;
  border-block:1px solid var(--wp--preset--color--accent-5);
}
.is-style-sp-section-navy :is(h1,h2,h3,h4,h5,h6){ color:var(--wp--preset--color--base-2); }
.is-style-sp-section-navy .sp-kicker{ color:#C9B27A; }
.is-style-sp-section-navy :is(p,li){ color:#fff; }
.is-style-sp-section-navy :is(.sp-prose p,.sp-section-head p:not(.sp-kicker),.sp-about-note,.sp-contact p){ color:rgba(255,255,255,.92); }
.is-style-sp-section-navy a:not(.wp-block-button__link){ color:#fff; text-decoration-color:rgba(255,255,255,.45); }
.is-style-sp-section-navy .wp-block-button__link{ background:#fff; color:var(--wp--preset--color--accent); }
.is-style-sp-section-navy .wp-block-button__link:hover{ background:var(--wp--preset--color--base); }
.is-style-sp-section-navy .is-style-outline .wp-block-button__link{ border-color:rgba(255,255,255,.4) !important; color:#fff !important; }
.is-style-sp-section-navy .is-style-outline .wp-block-button__link:hover{ background:rgba(255,255,255,.08) !important; border-color:#fff !important; }
.is-style-sp-section-navy .sp-expect li::before{ background-color:rgba(255,255,255,.14); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.is-style-sp-section-navy .sp-pullquote{ background:linear-gradient(90deg, rgba(255,255,255,.08), transparent); border-left-color:#C9B27A; }
.is-style-sp-section-navy .sp-commitments{ background:rgba(255,255,255,.14); border-color:rgba(255,255,255,.14); }
.is-style-sp-section-navy .sp-commitments > *{ background:var(--wp--preset--color--accent-2); }
.is-style-sp-section-navy .sp-commitments > *:hover{ background:var(--wp--preset--color--accent); }
.is-style-sp-section-navy .sp-commitments .sp-num{ color:#C9B27A; }
.is-style-sp-section-navy .sp-card-visit{ background:var(--wp--preset--color--base-2) !important; color:var(--wp--preset--color--contrast) !important; }
.is-style-sp-section-navy .sp-card-visit :is(h3,p,a){ color:var(--wp--preset--color--contrast); }
.is-style-sp-section-navy .sp-card-visit .sp-dt{ color:var(--wp--preset--color--contrast-2); }
.is-style-sp-section-navy .sp-card-visit .wp-block-separator{ border-color:var(--sp-line) !important; }
.is-style-sp-section-navy .sp-card-visit .wp-block-button__link{ background:var(--wp--preset--color--accent) !important; color:#fff !important; }
.is-style-sp-section-navy .sp-badge-next{ background:rgba(45,42,104,.08); border-color:var(--sp-line); }
.is-style-sp-section-navy .sp-portrait-placeholder{ color:rgba(255,255,255,.7); border-color:rgba(255,255,255,.2); background:radial-gradient(70% 60% at 50% 30%, rgba(255,255,255,.16), transparent 70%), linear-gradient(160deg, #2D2A68, #22204F); }

/* Automatic alternation (Customizer option, on by default):
   direct children of <main class="sp-sections"> with no explicit Section
   style alternate cream / paper, so two new sections never blur together. */
body.sp-alternate-sections .sp-sections > .wp-block-group:not([class*="is-style-sp-section-"]):nth-child(even){
  background:var(--wp--preset--color--base-2);
  border-block:1px solid var(--sp-line-soft);
}
/* Never let two identical bands touch: double borders collapse to one */
.sp-sections > [class*="is-style-sp-section-"] + [class*="is-style-sp-section-"]{ border-top-width:0; }
.sp-sections > .is-style-sp-section-brass + *{ border-top-width:0; }
.sp-sections > * + .is-style-sp-section-brass{ border-top-width:3px; }

/* Uniform rhythm: every direct section of <main> gets the same top/bottom
   padding whatever was saved in the editor, so the gaps stay equal. */
.sp-sections > .wp-block-group{
  padding-top:var(--sp-section-pad) !important;
  padding-bottom:var(--sp-section-pad) !important;
}
.sp-sections > .wp-block-group > .sp-section-head{ margin-bottom:var(--sp-head-gap) !important; }

/* Tighter internal rhythm (overrides margins saved with older markup) */
.sp-hero .sp-hero-lockup{ margin-bottom:1.25rem !important; }
.sp-hero .wp-block-buttons{ margin-top:1.25rem !important; }
.sp-hero .sp-hero-facts{ margin-top:1.5rem !important; padding-top:1rem !important; }
.sp-sections .sp-about-note{ margin-top:1.25rem !important; }
.sp-sections .wp-block-buttons[style*="margin-top"]{ margin-top:1.25rem !important; }
.sp-expect{ margin-top:1.25rem; }
.sp-pullquote{ margin-top:1.25rem; }
.sp-form-card{ margin-top:0; }

/* Section furniture */
.sp-section-head{ max-width:min(100%, 66ch); }
.wp-block-column > .sp-section-head{ max-width:100%; }
.sp-section-head p:not(.sp-kicker){ color:var(--wp--preset--color--contrast); font-size:1.15rem; }
.sp-prose p{ color:var(--wp--preset--color--contrast); }

/* ======================================================================
   Self-realigning layouts
   ====================================================================== */

/* .sp-flow on a Columns block: columns keep their chosen share, shrink
   gracefully, never overflow, and stack below 782px (core behaviour). */
.wp-block-columns.sp-flow > .wp-block-column{ min-width:0; }
@media (min-width:782px){ .wp-block-columns.sp-flow{ flex-wrap:nowrap !important; } }

/* Anything that may become a sticky sidebar lines up under the header */
.sp-sticky, .sp-card-visit{ position:sticky; top:calc(var(--sp-header-h) + 1.5rem); }
@media (max-width:900px){ .sp-sticky, .sp-card-visit{ position:static; } }
/* A sticky card inside a wrapped (single-column) row shouldn't stick */

/* Commitments grid: a Group with the Grid layout (auto-fill, min 15rem).
   Add or remove a commitment and the row count sorts itself out. */
.sp-commitments{
  gap:1px !important; background:var(--sp-line);
  border:1px solid var(--sp-line); border-radius:var(--sp-radius); overflow:hidden;
}
.sp-commitments > *{ background:var(--wp--preset--color--base); transition:background .2s ease; min-width:0; }
.sp-commitments > *:hover{ background:var(--wp--preset--color--base-2); }
.sp-commitments .sp-num{
  font-family:var(--wp--preset--font-family--playfair-display); font-size:1rem;
  color:var(--wp--preset--color--accent-4); letter-spacing:.04em; margin:0 0 1.1rem;
}
.sp-commitments h3{ font-size:1.4rem; margin:0 0 .6rem; }
.sp-commitments p:not(.sp-num){ font-size:1.02rem; color:var(--wp--preset--color--contrast); line-height:1.65; margin:0; }
/* One row of four equal columns on desktop; 2×2 on tablets; stacked on phones */
.sp-commitments.is-layout-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
@media (max-width:900px){ .sp-commitments.is-layout-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:520px){ .sp-commitments.is-layout-grid{ grid-template-columns:minmax(0, 1fr); } }
/* legacy markup (Columns-based commitments saved before v1.1) */
.wp-block-columns.sp-commitments{ flex-wrap:wrap !important; }
.wp-block-columns.sp-commitments > .wp-block-column{ flex:1 1 15rem !important; }
.sp-about-note{ color:var(--wp--preset--color--contrast); max-width:62ch; }

/* "What to expect" list */
.sp-expect{ list-style:none; padding:0; margin:2rem 0 0; display:grid; gap:.85rem; }
.sp-expect li{ position:relative; padding-left:2.1rem; font-size:1.05rem; }
.sp-expect li::before{
  content:""; position:absolute; left:0; top:.15rem; width:22px; height:22px; border-radius:50%;
  background:var(--wp--preset--color--contrast-3);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D2A68' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size:12px; background-repeat:no-repeat; background-position:center;
}

/* Pull quote */
.sp-pullquote{
  padding:1.4rem 1.6rem; margin:2.25rem 0 0;
  background:linear-gradient(90deg, rgba(125,95,44,.07), transparent);
  border-radius:0 10px 10px 0;
}
.sp-pullquote p{ margin:0; font-style:normal; }

/* Visit card */
.sp-card-visit{ border-radius:var(--sp-radius); box-shadow:var(--sp-shadow); }
.sp-card-visit .sp-dt{
  font-family:var(--wp--preset--font-family--montserrat); font-weight:600; font-size:.68rem;
  letter-spacing:.16em; text-transform:uppercase; color:rgba(255,255,255,.82); margin:0 0 .35rem;
}
.sp-card-visit .sp-dd{ margin:0; font-size:1.06rem; line-height:1.5; color:#fff; }
.sp-card-visit a{ color:#fff; text-underline-offset:3px; text-decoration-color:rgba(255,255,255,.7); }
.sp-card-visit .wp-block-separator{ border-color:rgba(255,255,255,.16) !important; opacity:1; margin:.25rem 0; }
.sp-card-visit .wp-block-button__link{ background:#fff !important; color:var(--wp--preset--color--accent) !important; width:100%; }
.sp-card-visit .wp-block-button__link:hover{ background:var(--wp--preset--color--base) !important; }
.sp-card-visit .wp-block-button{ width:100%; }
.sp-badge-next{
  display:inline-flex; align-items:center; gap:.5rem;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.35);
  border-radius:999px; padding:.32rem .8rem; font-size:.88rem; font-weight:500; color:#fff;
}
.sp-badge-next::before{ content:""; width:7px; height:7px; border-radius:50%; background:#9C97E8; }

/* ---------- Contact form ---------- */
.sp-form-card{
  background:var(--wp--preset--color--base-2); border:1px solid var(--sp-line);
  border-radius:var(--sp-radius); box-shadow:var(--sp-shadow);
}
.sp-form{ display:grid; gap:1rem; }
.sp-form__row{ display:grid; gap:1rem; grid-template-columns:repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.sp-form__field{ display:grid; gap:.4rem; }
.sp-form label{
  font-family:var(--wp--preset--font-family--montserrat); font-weight:600; font-size:.74rem;
  letter-spacing:.14em; text-transform:uppercase; color:var(--wp--preset--color--accent);
}
.sp-form__req{ color:var(--wp--preset--color--accent-4); }
.sp-form input:not([type="hidden"]), .sp-form textarea{
  width:100%; box-sizing:border-box; font:inherit; font-size:1.05rem; color:var(--wp--preset--color--contrast);
  background:#fff; border:1px solid var(--sp-line); border-radius:10px; padding:.75rem .9rem;
  transition:border-color .16s ease, box-shadow .16s ease;
}
.sp-form textarea{ resize:vertical; min-height:8rem; }
.sp-form input:focus, .sp-form textarea:focus{
  outline:none; border-color:var(--wp--preset--color--accent-3);
  box-shadow:0 0 0 3px rgba(45,42,104,.15);
}
.sp-form__actions{ display:grid; gap:.75rem; margin-top:.25rem; }
.sp-form__submit{ width:100%; cursor:pointer; border:0; color:#fff !important; }
.sp-form__note{ margin:0; font-size:.9rem; color:var(--wp--preset--color--contrast-2); }
.sp-form__notice{ padding:.9rem 1.1rem; border-radius:10px; font-size:1rem; line-height:1.5; }
.sp-form__notice.is-success{ background:#E6F2EA; border:1px solid #9CCBA9; color:#17482A; }
.sp-form__notice.is-error{ background:#FBEAEA; border:1px solid #E3A6A6; color:#6B1F1F; }
/* Honeypot: off-screen for people (not display:none, which some bots detect) */
.sp-form__hp{ position:absolute !important; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.is-style-sp-section-navy .sp-form label{ color:var(--wp--preset--color--accent); }

body .sp-contact-form-note{ display:none; }

/* Contact */
.sp-portrait{
  aspect-ratio:4/5; width:min(100%, 360px); border-radius:var(--sp-radius); overflow:hidden;
  border:1px solid var(--sp-line);
}
.sp-portrait img{ width:100%; height:100%; object-fit:cover; display:block; }
.sp-portrait-placeholder{
  aspect-ratio:4/5; width:min(100%, 360px); border-radius:var(--sp-radius);
  border:1px solid var(--sp-line);
  background:radial-gradient(70% 60% at 50% 30%, rgba(45,42,104,.14), transparent 70%), linear-gradient(160deg, #EFEBE1, #ECEBF4);
  display:grid; place-items:center; text-align:center; padding:1.5rem;
  color:var(--wp--preset--color--contrast); font-size:.95rem;
}
.sp-contact p{ color:var(--wp--preset--color--contrast); }

/* Footer */
.sp-footer{ font-size:1rem; }
.sp-footer .sp-footer-lockup img{ height:88px; width:auto; }
.sp-footer a{ color:rgba(255,255,255,.9); text-decoration:none; }
.sp-footer a:hover{ color:#fff; }
.sp-footer .wp-block-navigation{ justify-content:center; gap:1.5rem; }
.sp-footer-legal{ border-top:1px solid rgba(255,255,255,.18); color:rgba(255,255,255,.78) !important; font-size:.92rem; max-width:60ch; margin-inline:auto; }

/* ---------- Back to top (injected by south-presby.js) ---------- */
.sp-to-top{
  position:fixed; right:clamp(1rem, 3vw, 1.75rem); bottom:clamp(1rem, 3vw, 1.75rem); z-index:40;
  display:inline-flex; align-items:center; gap:.4rem;
  padding:.7rem .95rem; border-radius:999px;
  background:var(--wp--preset--color--accent); color:#fff !important; text-decoration:none;
  font-family:var(--wp--preset--font-family--inter); font-size:.9rem; font-weight:500; line-height:1;
  box-shadow:0 10px 24px -10px rgba(27,25,64,.55), 0 1px 2px rgba(27,25,64,.3);
  opacity:0; transform:translateY(12px); pointer-events:none;
  transition:opacity .25s ease, transform .25s ease, background .16s ease;
}
.sp-to-top.is-visible{ opacity:1; transform:none; pointer-events:auto; }
.sp-to-top:hover, .sp-to-top:focus-visible{ background:var(--wp--preset--color--accent-2); color:#fff; }
.sp-to-top:focus-visible{ outline:3px solid #C9B27A; outline-offset:2px; }
.sp-to-top svg{ flex:none; }
@media (max-width:600px){ .sp-to-top span{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); } .sp-to-top{ padding:.8rem; } }
@media (prefers-reduced-motion:reduce){ .sp-to-top{ transition:opacity .25s ease; transform:none; } }
@media print{ .sp-to-top{ display:none; } }

/* Keep anchored sections reachable below whatever height the header has */
.sp-anchor, [id]{ scroll-margin-top:calc(var(--sp-header-h) + 1rem); }
