/* Retrofit of the recovered Squarespace pages onto the 9Zero design system.
   Loaded only on Squarespace-built pages (scripts/apply-chrome.mjs decides). Kept to
   theme-level rules: no YUI block IDs, no per-page overrides. */

/* type: Space Grotesk everywhere, light body copy, kerning (as in Tamsin's mockups) */
body { font-feature-settings: "kern"; }
body, .sqs-html-content, .sqs-block-content, .blog-item-content, .summary-excerpt { font-family: var(--nz-font); }
.sqs-html-content p, .blog-item-content p, .summary-excerpt p, .list-item-content__description p, .user-items-list p { font-weight: 300; }
.sqs-html-content strong, .blog-item-content strong { font-weight: 600; }
h1, h2, h3, h4 { font-family: var(--nz-font); }

/* navy is chrome-only in the new system: dark bands use the dark teal */
[data-section-theme="dark"] {
  --siteBackgroundColor: hsla(var(--black-hsl), 1);
  --sqsp-background-color: hsla(var(--black-hsl), 1);
}

/* buttons: the DS button from /host-your-event. Sentence case (labels fixed in the HTML by
   scripts/ds-retrofit.py), Medium 15px, same radius. Primary = Flame fill, secondary/tertiary = outline. */
.sqs-block-button-element, .list-item-content__button, .list-section-button, .newsletter-form-button, .form-submit-button,
.image-button a, .user-items-list-banner-slideshow__button {
  display: inline-flex !important; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 11px 20px !important; border-radius: var(--nz-radius-btn) !important;
  font: 500 var(--nz-small)/1.2 var(--nz-font) !important; letter-spacing: .01em !important; text-transform: none !important;
  white-space: normal; transition: background-color .15s, color .15s, border-color .15s;
}
.sqs-button-element--primary, .newsletter-form-button, .form-submit-button {
  background: var(--nz-flame-ink) !important; color: var(--nz-white) !important; border: 1.5px solid transparent !important;
}
.sqs-button-element--primary:hover { background: #A82808 !important; opacity: 1 !important; }
.sqs-button-element--secondary, .sqs-button-element--tertiary {
  background: transparent !important; color: var(--nz-teal) !important; border: 1.5px solid var(--nz-teal) !important; text-decoration: none !important;
}
.sqs-button-element--secondary:hover, .sqs-button-element--tertiary:hover { background: var(--nz-teal) !important; color: var(--nz-white) !important; opacity: 1 !important; }
:is([data-section-theme="dark"], [data-section-theme="black"], [data-section-theme="dark-bold"], [data-section-theme="black-bold"]) :is(.sqs-button-element--secondary, .sqs-button-element--tertiary) {
  color: var(--nz-white) !important; border-color: var(--nz-white) !important;
}
:is([data-section-theme="dark"], [data-section-theme="black"], [data-section-theme="dark-bold"], [data-section-theme="black-bold"]) :is(.sqs-button-element--secondary, .sqs-button-element--tertiary):hover {
  background: var(--nz-white) !important; color: var(--nz-teal) !important;
}

/* section titles on list sections: DS eyebrow + left-aligned sentence-case H2 (markup from ds-retrofit.py) */
.list-section-title.nz-ds-head { text-align: left !important; padding-left: 0 !important; padding-right: 0 !important; }
.nz-ds-head .nz-eyebrow { margin-bottom: 14px; }
:is([data-section-theme="dark"], [data-section-theme="black"]) .nz-ds-head .nz-eyebrow { color: var(--nz-flame-on-dark); }
.nz-ds-head .nz-ds-h2 { margin: 0; font: 400 var(--nz-h2)/1.12 var(--nz-font); letter-spacing: -.005em; color: inherit; text-transform: none; }
.user-items-list { padding-left: max(var(--nz-gutter), calc((100% - var(--nz-wrap)) / 2)) !important; padding-right: max(var(--nz-gutter), calc((100% - var(--nz-wrap)) / 2)) !important; }
.user-items-list:has(.nz-ds-head) .list-section-button-container { text-align: left; }

/* list carousels: native scroll, no Squarespace runtime. Slides stay inside the 1240 container. */
.user-items-list-carousel .user-items-list-carousel__slides { display: flex !important; gap: var(--nz-gap, 20px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; align-items: flex-start; transform: none !important; padding-inline: 0; scroll-padding-inline: 0; }
.user-items-list-carousel .user-items-list-carousel__slides::-webkit-scrollbar { display: none; }
.user-items-list-carousel .user-items-list-carousel__slide { grid-area: auto !important; flex: 0 0 calc((100% - (var(--nz-cols, 1) - 1) * var(--nz-gap, 20px)) / var(--nz-cols, 1)); max-width: none !important; min-width: 0; scroll-snap-align: start; }
@media (prefers-reduced-motion: reduce) { .user-items-list-carousel .user-items-list-carousel__slides { scroll-behavior: auto; } }

/* Squarespace hides list slides (opacity:0, translateX(-9999px)) until its JS mounts.
   Pages without the per-page restore-fixes style — notably /seattle after the hero rebuild —
   would otherwise show only arrows over an empty band. Scope these to the carousel
   only so simple/banner lists and other imgs with data-src are left alone. */
.user-items-list-carousel .user-items-list-carousel__slides,
.user-items-list-carousel .user-items-list-carousel__slide { opacity: 1 !important; visibility: visible !important; }
.user-items-list-carousel .user-items-list-carousel__slide { transform: none !important; }
.user-items-list-carousel img[data-src] { visibility: visible !important; opacity: 1 !important; }

/* one page container for header, DS sections and Squarespace sections (1240px + gutters) */
body { --maxPageWidth: var(--nz-wrap); }
@media (min-width: 768px) { body { --pagePadding: var(--nz-gutter); --sqs-site-gutter: var(--nz-gutter); } }

/* converted Squarespace accordions use the host-page FAQ (.nz-faq) */
.nz-faq.nz-faq--sq { font-family: var(--nz-font); color: var(--nz-teal); text-align: left; }
.nz-faq--sq summary { color: var(--nz-teal); }
.nz-faq--sq details > div { padding: 0 clamp(18px, 2.4vw, 28px) 24px; max-width: 840px; font-size: 1.0625rem; line-height: 1.6; font-weight: 300; }
.nz-faq--sq details > div p { margin: 0 0 12px; padding: 0; font-size: inherit; line-height: inherit; }
.nz-faq--sq details > div :is(ul, ol) { margin: 0 0 12px; padding-left: 1.2em; }

/* photos: rectangular with the card radius, like the event pages (circles keep their own shape) */
.sqs-block-image .fluid-image-container:not(.sqs-image-shape-container-element),
.sqs-gallery-design-grid-slide img, .gallery-grid-item img, .gallery-masonry-item img,
.user-items-list-carousel__media-container, .user-items-list-simple .list-item-media-inner,
.summary-thumbnail-container:not(.sqs-gallery-image-container), .blog-item .image-wrapper {
  border-radius: var(--nz-radius-card);
  overflow: hidden;
}
#block-yui_3_17_2_1_1756536134039_8414 .summary-thumbnail-container { border-radius: 0; overflow: visible; } /* member circles (custom.css) */


/* blog: category pill + meta in the system colors (from live custom.css) */
.blog-item-category { border-radius: 999px; }
.blog-item-title h1, .blog-title a, .summary-title a { font-weight: 400; }

/* the shared header replaces Squarespace's, so drop its leftover offsets */
#siteWrapper { padding-top: 0 !important; }
.header-announcement-bar-wrapper, .header-menu { display: none !important; }

/* headings re-levelled for a correct outline (h4→h2/h3, h2→h1) keep the look of their old level.
   Copied from Squarespace's h4/h2 rules with the element swapped for .nz-lvl-h4/.nz-lvl-h2. */
.sqs-block-html .sqs-html-content .sqsrte-scaled-text-container>.sqsrte-scaled-text .nz-lvl-h4{margin:0;padding:0;line-height:1;font-size:inherit !important}
.nz-lvl-h4{font-family:var(--heading-font-font-family);font-style:var(--heading-font-font-style);font-weight:var(--heading-font-font-weight);line-height:var(--heading-font-line-height);letter-spacing:var(--heading-font-letter-spacing);text-transform:var(--heading-font-text-transform)}
.nz-lvl-h4{line-height:calc(var(--heading-font-line-height) * (1 + (1 - var(--heading-4-size-value))/25))}
@media screen and (max-width:  767px ) and (orientation: portrait){.nz-lvl-h4{font-size:calc((var(--heading-4-size-value) - 1) * calc(.012 * min(100vh, 900px)) + 1rem)}
}
@media screen and (min-width:  768px ),screen and (orientation:landscape){.nz-lvl-h4{font-size:min(calc((var(--heading-4-size-value) - 1) * 1.2vw + 1rem), max(calc((var(--heading-4-size-value) - 1) * 0.012 * var(--maxPageWidth) + 1rem), calc(var(--heading-4-size-value) * 1rem)))}
}
.nz-lvl-h4{color:var(--headingSmallColor)}
.sqs-background-enabled.sqs-block-html .nz-lvl-h4,.sqs-background-enabled.sqs-block-accordion .nz-lvl-h4{color:var(--tweak-heading-small-color-on-background)}
@media screen and (min-width:768px){.sqs-stack-container[data-background-enabled] .sqs-block-html .nz-lvl-h4,.sqs-stack-container[data-background-enabled] .sqs-block-accordion .nz-lvl-h4{color:var(--tweak-heading-small-color-on-background)}
}
@media screen and (max-width:767px){.sqs-stack-container[data-background-enabled-system_mobile="true"] .sqs-block-html .nz-lvl-h4,.sqs-stack-container[data-background-enabled]:not([data-background-enabled-system_mobile]) .sqs-block-html .nz-lvl-h4,.sqs-stack-container[data-background-enabled-system_mobile="true"] .sqs-block-accordion .nz-lvl-h4,.sqs-stack-container[data-background-enabled]:not([data-background-enabled-system_mobile]) .sqs-block-accordion .nz-lvl-h4{color:var(--tweak-heading-small-color-on-background)}
}
.sqs-block-html .nz-lvl-h4 a{color:var(--headingLinkColor)}
.sqs-block-html .sqs-html-content .sqsrte-scaled-text-container>.sqsrte-scaled-text .nz-lvl-h2{margin:0;padding:0;line-height:1;font-size:inherit !important}
.nz-lvl-h2{font-family:var(--heading-font-font-family);font-style:var(--heading-font-font-style);font-weight:var(--heading-font-font-weight);line-height:var(--heading-font-line-height);letter-spacing:var(--heading-font-letter-spacing);text-transform:var(--heading-font-text-transform)}
.nz-lvl-h2{line-height:calc(var(--heading-font-line-height) * (1 + (1 - var(--heading-2-size-value))/25))}
@media screen and (max-width:  767px ) and (orientation: portrait){.nz-lvl-h2{font-size:calc((var(--heading-2-size-value) - 1) * calc(.012 * min(100vh, 900px)) + 1rem)}
}
@media screen and (min-width:  768px ),screen and (orientation:landscape){.nz-lvl-h2{font-size:min(calc((var(--heading-2-size-value) - 1) * 1.2vw + 1rem), max(calc((var(--heading-2-size-value) - 1) * 0.012 * var(--maxPageWidth) + 1rem), calc(var(--heading-2-size-value) * 1rem)))}
}
.nz-lvl-h2{color:var(--headingLargeColor)}
.sqs-background-enabled.sqs-block-html .nz-lvl-h2,.sqs-background-enabled.sqs-block-accordion .nz-lvl-h2{color:var(--tweak-heading-large-color-on-background)}
@media screen and (min-width:768px){.sqs-stack-container[data-background-enabled] .sqs-block-html .nz-lvl-h2,.sqs-stack-container[data-background-enabled] .sqs-block-accordion .nz-lvl-h2{color:var(--tweak-heading-large-color-on-background)}
}
@media screen and (max-width:767px){.sqs-stack-container[data-background-enabled-system_mobile="true"] .sqs-block-html .nz-lvl-h2,.sqs-stack-container[data-background-enabled]:not([data-background-enabled-system_mobile]) .sqs-block-html .nz-lvl-h2,.sqs-stack-container[data-background-enabled-system_mobile="true"] .sqs-block-accordion .nz-lvl-h2,.sqs-stack-container[data-background-enabled]:not([data-background-enabled-system_mobile]) .sqs-block-accordion .nz-lvl-h2{color:var(--tweak-heading-large-color-on-background)}
}
.sqs-block-html .nz-lvl-h2 a{color:var(--headingLinkColor)}
.nz-lvl-h2 { font-family: 'SpaceGrotesk'; }

/* page-level heading that is read but not shown (e.g. /cluster-collection) */
.nz-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* shape blocks: Squarespace's JS sized the <svg> to its block; without it the svg is 300x150 */
.sqs-shape-block-container > svg.sqs-shape { width: 100%; height: 100%; overflow: visible; }

/* small Flame text (links, accent words in body copy) uses the contrast-safe Flame tokens; large
   headline accents keep #F2552C */
:is(.sqs-html-content, .accordion-item__description, .blog-item-content, .summary-excerpt) :is(p, li) a,
:is(.sqs-html-content, .blog-item-content) p .sqsrte-text-color--accent { color: var(--nz-flame-ink); }
:is([data-section-theme="dark"], [data-section-theme="black"], [data-section-theme="dark-bold"], [data-section-theme="black-bold"]) :is(.sqs-html-content, .summary-excerpt) :is(p, li) a,
:is([data-section-theme="dark"], [data-section-theme="black"], [data-section-theme="dark-bold"], [data-section-theme="black-bold"]) .sqs-html-content p .sqsrte-text-color--accent { color: var(--nz-flame-on-dark); }

/* /cluster-collection: left index of cluster names + one centred text column (posts have no images) */
.nz-cc .blog-image-wrapper:empty { display: none; }
.nz-cc .blog-side-by-side-wrapper { width: 100%; min-width: 0; }
.nz-cc .blog-item { display: block !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
.nz-cc .blog-item-summary { width: 100% !important; max-width: 760px; margin: 0 !important; padding: 0 !important; }
.nz-cc .blog-item { scroll-margin-top: calc(var(--nz-header-h) + 24px); }
.nz-cc-index { font-family: var(--nz-font); }
.nz-cc-index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--nz-line); }
.nz-cc-index li { border-bottom: 1px solid var(--nz-line); }
.nz-cc-index a { display: block; padding: 10px 0; color: var(--nz-teal); text-decoration: none; font-size: 1rem; font-weight: 400; }
.nz-cc-index a:hover { color: var(--nz-flame-ink); }
@media (min-width: 1024px) {
  .nz-cc { display: grid !important; grid-template-columns: 240px minmax(0, 760px); gap: 0 clamp(48px, 6vw, 96px); justify-content: start; align-items: start; }
  .nz-cc-index { position: sticky; top: calc(var(--nz-header-h) + 32px); }
}
@media (max-width: 1023px) { .nz-cc-index { margin-bottom: 48px; } }
.blog-more-link, .summary-read-more-link { color: var(--nz-flame-ink) !important; }
/* blog/collection lists pad inside the page width; widen by the gutters so text lines up with the header */
@media (min-width: 768px) { .blog-list { max-width: calc(var(--nz-wrap) + 2 * var(--nz-gutter)) !important; } }
:is(.summary-excerpt, .blog-excerpt, .sqs-html-content) a :is(u, span, strong, em), :is(.summary-excerpt, .blog-excerpt) a { color: var(--nz-flame-ink); }
.blog-item-category { background-color: var(--nz-flame-ink) !important; }
.nz-faq--sq a { color: var(--nz-flame-ink); }


/* Tom Steyer / lessons item: cap the text column to the 1240 container and center it
   with the header/footer (Squarespace uses 18% side margins, which sit 199px left of
   the 1240 wrap at 2560). Drop the empty pagination and leftover margin above the footer. */
.lesson-item .lesson-detail-text-wrapper,
.lesson-detail-text-wrapper,
.lesson-details-title,
.lesson-details-description,
.lesson-details-description p {
  max-width: var(--nz-wrap);
  margin-left: auto;
  margin-right: auto;
}
.lesson-details { margin-bottom: 0 !important; }
.lesson-item-pagination:not(:has(a)) { display: none; }

/* Cap tall Squarespace section padding at large widths (the ~400px cream and teal bands). */
.user-items-list { padding-top: min(6.6vmax, 80px) !important; padding-bottom: min(6.6vmax, 80px) !important; }
@media (min-width: 1440px) {
  .section-height--small { min-height: 0 !important; }
  /* Drop the stacked 3.3vmax content-wrapper padding and the extra 100px section
     pad above list titles (it left a ~400px empty band over "Why members love 9Zero"). */
  .page-section.section-height--small > .content-wrapper {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .page-section.user-items-list-section { padding-top: 0 !important; }
}
