/* SHG shared visual system. Load after page styles on every route.
   Existing layouts retain their structure; roles share the same tokens. */
:root {
  --ds-font-display: 'Wix Madefor Display', sans-serif;
  --ds-font-text: 'Wix Madefor Text', sans-serif;
  --ds-paper: #f7f5f0;
  --ds-ink: #14120f;
  --ds-body: #2b2825;
  --ds-muted: #65615c;
  --ds-line: #d9d5ce;
  --ds-error: #9e3b33;
  --ds-success: #176334;
  --ds-content: 1280px;
  --ds-measure: 640px;
  --ds-gutter: 40px;
  --ds-h1: clamp(36px, 4.1vw, 56px);
  --ds-h1-line: 1.04;
  --ds-h2: 36px;
  --ds-h2-line: 1.12;
  --ds-h3: 28px;
  --ds-h3-line: 1.2;
  --ds-h4: 22px;
  --ds-body-size: 18px;
  --ds-body-line: 1.7;
  --ds-meta-size: 14px;
  --ds-meta-line: 1.5;
  --ds-ui-size: 16px;
  --ds-section-pad: 80px;
  --ds-section-gap: 160px;
  --ds-heading-gap: 64px;
  --ds-page-top: 96px;
  --ds-copy-gap: 24px;
  --ds-list-gap: 24px;
  --ds-grid-gap: 64px;
  --ds-stack-gap: 48px;
  --ds-button-height: 52px;
  --ds-compact-height: 44px;
  --ds-control-height: 52px;

  --paper: var(--ds-paper);
  --paper-hover: #f1eee7;
  --stone: var(--ds-paper);
  --surface: var(--ds-paper);
  --surface-hover: var(--paper-hover);
  --night: var(--ds-ink);
  --night-rgb: 20, 18, 15;
  --ink: var(--ds-ink);
  --body: var(--ds-body);
  --muted-2: var(--ds-muted);
  --line: var(--ds-line);
  --error: var(--ds-error);
  --on-dark: #fff;
  --on-dark-2: var(--ds-paper);
  --fw-normal: 400;
  --fw-bold: 600;
  --ls-display: -.03em;
  --ls-tight: -.02em;
  --rhythm-pad: var(--ds-section-pad);
  --rhythm-gap: var(--ds-section-gap);
  --rhythm-head: var(--ds-heading-gap);
  --rhythm-top: var(--ds-page-top);
}

body.shg-site {
  background: var(--ds-paper);
  color: var(--ds-ink);
  font-family: var(--ds-font-text);
  font-size: var(--ds-body-size);
  font-weight: 400;
  line-height: var(--ds-body-line);
  --founder-section-top: var(--ds-section-pad);
  --founder-section-bottom: var(--ds-section-pad);
  --founder-heading-size: var(--ds-h2);
  --founder-heading-line: var(--ds-h2-line);
  --founder-heading-gap: var(--ds-heading-gap);
  --founder-body-size: var(--ds-body-size);
  --founder-body-line: var(--ds-body-line);
  --founder-copy-gap: var(--ds-copy-gap);
  --founder-item-gap: var(--ds-list-gap);
  --founder-split-gap: var(--ds-grid-gap);
  --founder-stack-gap: var(--ds-stack-gap);
}

/* Containers: one outer edge, then dedicated reading-width columns. */
body.shg-site .wrap {
  max-width: calc(var(--ds-content) + 2 * var(--ds-gutter));
  padding-inline: var(--ds-gutter);
}
body.shg-site :is(.company-about__inner, .experience-section__inner,
  .founder-profile-main, .library-books__inner, .checkout-main, .product) {
  width: calc(100% - 2 * var(--ds-gutter));
  max-width: var(--ds-content);
  margin-inline: auto;
}
body.shg-site :is(.founder-story--text, #process .process__layout) { max-width: var(--ds-content); }
body.shg-site :is(.company-about__copy, .founder-standalone-copy,
  .founder-story--intro .founder-story__copy, .product__about) { max-width: var(--ds-measure); }
body.shg-site .legal-page { max-width: calc(800px + 2 * var(--ds-gutter)); }
body.shg-site .topbar--light ~ main { padding-top: 69px; }
body.shg-site .legal-page { padding-block: var(--ds-page-top) var(--ds-section-pad); }
body.shg-site .product-section { max-width: none; padding-inline: 0; }

/* Page titles. Product panels use the section scale to fit long book titles. */
body.shg-site :is(.hero-full, .obj-hero, .project-catalog, .contacts-intro,
  .checkout-copy, .payment-result, .legal-page) h1 {
  font-family: var(--ds-font-display);
  font-size: var(--ds-h1);
  font-weight: 600;
  line-height: var(--ds-h1-line);
  letter-spacing: var(--ls-display);
  text-transform: none;
}

/* These two index-page titles use the regular section-heading scale. */
body.shg-site :is(.contacts-intro, .project-catalog) h1 {
  font-size: var(--ds-h2);
  line-height: var(--ds-h2-line);
}

body.shg-site :is(.obj-hero, .checkout-copy, .legal-page) h1 { margin-bottom: var(--ds-copy-gap); }
body.shg-site .hero-full h1 { margin-bottom: var(--ds-copy-gap); }
body.shg-site :is(.library-hero, .founder-hero) h1 { margin-bottom: 0; }

/* Section headings; card titles and reader headings have their own roles. */
body.shg-site main h2:where(:not(.project__name):not(.library-books__title):not(.awards-teaser__label)) {
  font-family: var(--ds-font-display);
  font-size: var(--ds-h2);
  font-weight: 600;
  line-height: var(--ds-h2-line);
  letter-spacing: var(--ls-display);
  text-transform: none;
}
body.shg-site :is(.head h2, .founder-story h2, .company-about h2,
  .experience-section h2, .contacts-addresses > h2, .project-about__eyebrow,
  .product__about-heading, .contents__heading) {
  max-width: none;
  text-align: center;
}
body.shg-site :is(.head, .object-gallery-section__head, .project-about__topline) {
  margin-bottom: var(--ds-heading-gap);
}
body.shg-site :is(.company-about h2, .founder-story h2, .contacts-addresses > h2,
  .product__about-heading, .contents__heading) { margin: 0 0 var(--ds-heading-gap); }
body.shg-site :is(.head, .project-about__topline) h2 { margin: 0; }
body.shg-site .project-about__topline { justify-content: center; }
body.shg-site #experience.experience-section h2 {
  margin: 0 0 var(--ds-heading-gap);
  font: 600 var(--ds-h2)/var(--ds-h2-line) var(--ds-font-display);
}
body.shg-site #experience.experience-section .experience-section__inner { row-gap: 0; }
body.shg-site #experience .experience-featured:empty { display: none; }
body.shg-site #process > .head { margin-bottom: var(--ds-heading-gap); }

/* Component titles, including project names shared by home and catalog. */
body.shg-site :is(.project__name, .book__title, .founder__name,
  .project-about__story h3, .project-about__role-heading h3, .intro__title,
  .contacts-city, .checkout-summary h2) {
  font-family: var(--ds-font-display);
  font-size: var(--ds-h3);
  font-weight: 600;
  line-height: var(--ds-h3-line);
  letter-spacing: var(--ls-tight);
  text-transform: none;
}
body.shg-site #team .founder__name { font-size: var(--ds-h3); line-height: var(--ds-h3-line); }
body.shg-site #process .process__panel-title {
  margin-bottom: var(--ds-copy-gap);
  font: 600 var(--ds-h3)/var(--ds-h3-line) var(--ds-font-display);
}
body.shg-site :is(.product__title, .product__price) {
  font: 600 var(--ds-h2)/var(--ds-h2-line) var(--ds-font-display);
  letter-spacing: var(--ls-display);
}
body.shg-site :is(.contacts-addresses h3, .founder-timeline dt, .legal-page h2) {
  font: 600 var(--ds-h4)/1.3 var(--ds-font-display);
  letter-spacing: var(--ls-tight);
}

/* Body copy: all reading surfaces share size, line-height, colour and weight. */
body.shg-site main :is(p, li, dd, address) {
  font-family: var(--ds-font-text);
  font-size: var(--ds-body-size);
  font-weight: 400;
  line-height: var(--ds-body-line);
}
body.shg-site :is(.company-about__copy p, .founder-story p, .founder-story li,
  .founder-story dd, .project-about__copy p, .product__about p, .intro p,
  .legal-page p, .legal-page li, .legal-page dd, .checkout-lead, .payment-result p) {
  color: var(--ds-body);
  font-size: var(--ds-body-size);
  line-height: var(--ds-body-line);
}
body.shg-site #team :is(.founder__position, .founder__lead) {
  font-size: var(--ds-body-size);
  line-height: var(--ds-body-line);
}
body.shg-site #process :is(.process__panel p, .process__doing-list li, .process__result p) {
  font-size: var(--ds-body-size);
  line-height: var(--ds-body-line);
}
body.shg-site #process .process__doing-list { gap: var(--ds-list-gap) 32px; }
body.shg-site #process .process__doing-list li { padding: 0 0 0 18px; }
body.shg-site #process .process__doing-list li::before { top: .7em; }
body.shg-site #process .process__result { margin-top: 32px; padding-top: 0; }
body.shg-site #process .process__result-title {
  margin-bottom: 16px;
  font: 600 var(--ds-h4)/1.3 var(--ds-font-display);
}
body.shg-site :is(.hero-full .hero-full__proof, .hero-full .hero-full__qualification) {
  color: var(--on-dark);
  font-size: var(--ds-body-size);
  line-height: 1.5;
}
body.shg-site .hero-full--operator[data-hero-copy-variant="1"] .hero-full__qualification {
  font-size: var(--ds-meta-size);
  margin-bottom: var(--ds-copy-gap);
}
body.shg-site .project-about__role-text { color: var(--on-dark-2); }

/* Metadata remains smaller than primary reading copy. */
body.shg-site main :is(.small, .intro__note, .intro__sign, .product__back,
  .product__authors, .book__author, .contents__label, .contents__page,
  .checkout-security, .checkout-status, .checkout-summary__author,
  .checkout-summary__delivery, .contacts-label) {
  font-size: var(--ds-meta-size);
  line-height: var(--ds-meta-line);
}
body.shg-site :is(.project-about__fact dt, .contact-details dt,
  .founder-projects span) {
  color: var(--ds-muted);
  font: 400 var(--ds-meta-size)/var(--ds-meta-line) var(--ds-font-text);
  letter-spacing: normal;
  text-transform: none;
}
body.shg-site .project-about__fact dd { margin-top: 8px; font-size: var(--ds-body-size); line-height: var(--ds-body-line); }
body.shg-site #experience .experience-stat dd { font-size: var(--ds-body-size); line-height: var(--ds-body-line); }
body.shg-site #experience :is(.experience-stat__prefix, .experience-stat__unit) { font-size: var(--ds-meta-size); line-height: 1.5; }
body.shg-site #experience .experience-stat dt { padding-top: 24px; }
body.shg-site .book__price { color: var(--ds-ink); font-size: var(--ds-body-size); line-height: 1.5; }
body.shg-site :is(.contents__title, .contents__item--plain .contents__label) { font-size: var(--ds-body-size); line-height: var(--ds-body-line); }

/* Paragraph and list rhythm; container gaps are not added twice. */
body.shg-site :is(.company-about__copy p, .founder-story--intro p) { margin: 0; }
body.shg-site :is(.company-about__copy, .founder-story, .product__about, .intro) p + p { margin-top: var(--ds-copy-gap); }
body.shg-site .project-about__copy { gap: var(--ds-copy-gap); margin-top: var(--ds-copy-gap); }
body.shg-site .project-about__copy p { margin: 0; }
body.shg-site .legal-page :is(p, ul, ol) { margin: 0 0 var(--ds-copy-gap); }
body.shg-site .legal-page li + li { margin-top: 16px; }
body.shg-site .legal-page h2 { margin: var(--ds-stack-gap) 0 var(--ds-copy-gap); text-align: left; }
body.shg-site .founder-projects strong { font-weight: 600; }
body.shg-site :is(.founder-education-list, .founder-recognition-list,
  .founder-academic-list, .founder-list--standalone-grid) { row-gap: var(--ds-list-gap); }
body.shg-site .founder-specialization-list { margin-top: var(--ds-copy-gap); }
body.shg-site :is(.project-about__body, .founder-legal-grid) { gap: var(--ds-grid-gap); }
body.shg-site :is(.founder-specialization-layout, .founder-education-layout,
  .founder-recognition-layout, .founder-feature-layout,
  .founder-academic-layout) { gap: 0; }

/* One section rhythm everywhere, including transitions into the footer. */
body.shg-site main > .section:not(.product-section),
body.shg-site .home-projects-panel #projects.section,
body.shg-site #experience.experience-section,
body.shg-site #team.section,
body.shg-site #process.section,
body.shg-site #request.request-section,
body.shg-site main > .project-about,
body.shg-site :is(.contacts-addresses, .contacts-requisites, .founder-story) {
  padding-block: var(--ds-section-pad);
}
body.shg-site .home-project-transition > .company-about,
body.shg-site main > .library-books,
body.shg-site .founder-story--intro { padding-block: var(--ds-section-gap) var(--ds-section-pad); }
body.shg-site main > .section:first-child:not(.product-section),
body.shg-site main > .project-catalog { padding-top: var(--ds-page-top); }
body.shg-site .contacts-intro { padding-top: var(--ds-page-top); }
body.shg-site .contacts-connect { padding-top: var(--ds-heading-gap); }
body.shg-site .contacts-page > #personal-data { margin-block: var(--ds-copy-gap) var(--ds-section-pad); }
body.shg-site :is(.contacts-page, .founder-profile-main) { padding-bottom: 0; }

/* Contact values use the full page grid; each column keeps left-aligned copy. */
body.shg-site .contacts-connect {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  width: 100%;
  margin-inline: 0;
  column-gap: var(--ds-grid-gap, 64px);
}

body.shg-site .contacts-addresses__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  width: 100%;
  margin-inline: 0;
  column-gap: var(--ds-grid-gap, 64px);
}

body.shg-site :is(.contacts-connect > *, .contacts-addresses__grid > *) {
  min-width: 0;
  text-align: start;
}
body.shg-site #awards.awards-teaser { margin-block: var(--ds-section-pad); }
body.shg-site .founder-final { margin-block: var(--ds-section-pad); }
body.shg-site .founder-final + .founder-story { padding-top: var(--ds-section-pad); }
body.shg-site :is(.founder-final, #awards.awards-teaser) { background-color: var(--ds-ink); }
body.shg-site .founder-final { opacity: 1; transform: none; transition: none; }
body.shg-site .footer { margin-top: var(--ds-section-pad); padding-block: var(--ds-section-pad) 32px; }
body.shg-site .footer__in { padding-top: 0; padding-bottom: var(--ds-stack-gap); }
body.shg-site :is(#team.founders, #request.request-section) { box-shadow: 0 0 0 100vmax var(--ds-paper); }
body.shg-site .project-catalog { --stone: var(--ds-paper); }

/* Books retain their gallery/scroll behaviour and use the shared type roles. */
body.shg-site .product__about { margin-top: var(--ds-section-pad); padding-bottom: var(--ds-section-pad); }
body.shg-site .contents { padding-bottom: var(--ds-section-pad); }
body.shg-site .intro__title { margin-block: 16px var(--ds-copy-gap); }
body.shg-site .contents__scroll .intro { margin-top: var(--ds-stack-gap); }
body.shg-site :is(.product__authors, .book__author, .book__price) { margin-top: 16px; }
body.shg-site .product__price { margin-top: var(--ds-copy-gap); }
body.shg-site .product__actions { margin-top: 32px; }

/* Actions and forms. Compact navigation and text links share 44px targets. */
body.shg-site .btn {
  min-height: var(--ds-button-height);
  height: auto;
  padding: 14px 28px;
  border-radius: 0;
  font: 400 var(--ds-ui-size)/1.5 var(--ds-font-text);
}
body.shg-site .btn--text {
  min-height: var(--ds-compact-height);
  padding: 8px 0;
  font-size: var(--ds-meta-size);
}
body.shg-site .header__side .btn,
body.shg-site .cookie-consent__button {
  min-height: var(--ds-compact-height);
  height: auto;
  padding: 10px 24px;
  border-radius: 0;
  font: 400 var(--ds-meta-size)/1.5 var(--ds-font-text);
}
body.shg-site .nav > a:not(.nav__cta) { font: 400 var(--ds-meta-size)/1.5 var(--ds-font-text); }
body.shg-site :is(.field, .checkout-field) { gap: 8px; }
body.shg-site :is(.field label, .checkout-field label, .checkout-consent label, .check__body label) {
  color: var(--ds-body);
  font: 400 var(--ds-meta-size)/1.5 var(--ds-font-text);
}
body.shg-site :is(.field input, .field select, .field textarea,
  .checkout-field input, .checkout-field textarea) {
  min-height: var(--ds-control-height);
  height: auto;
  padding: 12px 0;
  border-radius: 0;
  border-bottom-color: var(--ds-line);
  font: 400 var(--ds-ui-size)/1.5 var(--ds-font-text);
}
body.shg-site :is(.field textarea, .checkout-field textarea) { min-height: 104px; }
body.shg-site :is(.field input, .field select, .field textarea,
  .checkout-field input, .checkout-field textarea):focus-visible {
  outline: 2px solid var(--ds-ink);
  outline-offset: 4px;
}
body.shg-site :is(.field input, .field select, .field textarea,
  .checkout-field input, .checkout-field textarea)[aria-invalid="true"],
body.shg-site .field--error :is(input, select, textarea) { border-color: var(--ds-error); }
body.shg-site :is(.checkout-error, .field__error, .checkout-status--error) { color: var(--ds-error); }
body.shg-site .checkout-status--ok { color: var(--ds-success); }
body.shg-site .checkout-fields { gap: var(--ds-copy-gap); }
body.shg-site :is(.checkout-consents, .checkout-submit) { gap: 16px; margin-top: 32px; }
body.shg-site .checkout-summary { background: var(--ds-paper); padding: 32px; }
body.shg-site .checkout-summary__image { margin-bottom: var(--ds-copy-gap); }
body.shg-site :is(.checkout-summary__line, .checkout-summary__total) { padding-block: 16px; font-size: var(--ds-meta-size); }
body.shg-site :is(.checkout-summary__line, .checkout-summary__delivery, .checkout-security) { margin-top: var(--ds-copy-gap); }
body.shg-site .checkout-main { padding-block: calc(69px + var(--ds-page-top)) var(--ds-section-pad); }
body.shg-site .checkout-lead { margin-bottom: var(--ds-heading-gap); }
body.shg-site .checkout-layout { gap: var(--ds-grid-gap); }
body.shg-site .payment-result { gap: var(--ds-copy-gap); padding-block: var(--ds-section-pad); }
body.shg-site .contacts-page :is(h1, h2) { text-align: start; }
body.shg-site .contacts-requisites {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--ds-heading-gap);
}
body.shg-site .contacts-requisites > div:last-child {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
@media (min-width: 769px) {
  body.shg-site .contacts-requisites {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 72px;
  }
}
body.shg-site .contacts-city { font-size: var(--ds-h3); line-height: var(--ds-h3-line); }

/* Repeated footer links retain identical target size on every template. */
body.shg-site .footer__navigation a {
  display: flex;
  align-items: center;
  min-height: var(--ds-compact-height);
  width: fit-content;
  max-width: 100%;
  padding: 8px 0;
}
body.shg-site .footer :is(p, address, li, a, .footer__h) { font-size: var(--ds-meta-size); line-height: 1.5; }

/* Content lists use the same black square marker across the site. */
body.shg-site main :is(.story__list, .founder-list, .legal-page ul) {
  list-style-type: square;
}
body.shg-site main :is(.story__list, .founder-list, .legal-page ul) > li::marker {
  color: var(--ds-ink, #14120f);
}

@media (max-width: 900px) {
  :root {
    --ds-gutter: 20px;
    --ds-h1: 36px;
    --ds-h1-line: 1.08;
    --ds-h2: 28px;
    --ds-h3: 22px;
    --ds-h3-line: 1.25;
    --ds-h4: 20px;
    --ds-body-size: 16px;
    --ds-section-pad: 48px;
    --ds-section-gap: 96px;
    --ds-heading-gap: 40px;
    --ds-page-top: 48px;
    --ds-grid-gap: 32px;
  }
  body.shg-site .hero-full h1 { font-size: clamp(28px, 9vw, 36px); }
  body.shg-site .library-hero h1 { max-width: 13ch; }
  body.shg-site .product__buy { padding-block: 32px; }
  body.shg-site .product { padding-top: calc(69px + var(--ds-page-top)); }
  body.shg-site .product__authors { margin-top: 16px; }
  body.shg-site .product__price { margin-top: var(--ds-copy-gap); }
  body.shg-site .product__actions { margin-top: var(--ds-copy-gap); }
  body.shg-site .checkout-summary { padding: var(--ds-copy-gap); }
  body.shg-site .header .header__top { column-gap: 8px; }
  body.shg-site .topbar .header__top .nav { gap: 12px; }
  body.shg-site .contacts-emails a { font-size: var(--ds-h4); line-height: 1.3; overflow-wrap: anywhere; }
}

@media (max-width: 760px) {
  body.shg-site .founder-legal-grid { gap: var(--ds-stack-gap); }
  body.shg-site :is(.founder-specialization-layout, .founder-education-layout,
    .founder-recognition-layout, .founder-feature-layout,
    .founder-academic-layout) { gap: var(--ds-stack-gap); }
  body.shg-site :is(.contacts-connect, .contacts-addresses__grid) {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    width: 100%;
    gap: 32px;
  }
  body.shg-site .hero-full--operator .hero-full__proof { font-size: clamp(14px, 4vw, 16px); line-height: 1.42; }
}

@media (max-width: 768px) {
  body.shg-site .nav > a:not(.nav__cta) {
    font: 400 var(--ds-h3)/var(--ds-h3-line) var(--ds-font-display);
  }
}

@media (max-width: 640px) {
  body.shg-site #team[data-mobile-founders] .founder-mobile-role {
    width: 100%;
    text-align: center;
    text-wrap: balance;
    min-height: 2.9em;
  }
}

/* A long title must remain reachable on short laptop viewports. */
@media (min-width: 901px) and (max-height: 760px) {
  body.shg-site .product__buy-inner { position: static; transform: none; }
  body.shg-site .product__buy { padding-block: calc(69px + 24px) 48px; }
}

@media (prefers-reduced-motion: reduce) {
  body.shg-site :is(.btn, .nav a, .cookie-consent__button) { transition: none; }
}
