/* Public-site typography and appearance refinements. */

body.reference-page .section-intro p.eyebrow {
  max-width: none;
  margin: 0 0 18px;
  font-size: 0.75rem;
  line-height: 1.33;
  letter-spacing: 0.14em;
}

body.reference-page .section-intro p:not(.eyebrow) {
  max-width: 65ch;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
}

body.reference-page .hero-composition h1,
body.secondary-page .page-hero h1 {
  font-size: clamp(2.75rem, 5vw, 4.5rem);
  line-height: 1.09;
  letter-spacing: -0.035em;
}

body.reference-page .hero-composition .hero-copy,
body.secondary-page .page-hero .hero-copy {
  max-width: 60ch;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.6;
}

body.reference-page .ecosystem-bridge-copy h2,
body.launch-mode.reference-page .audience-paths .section-intro h2,
body.launch-mode.reference-page .research-focus .section-intro h2,
body.reference-page .research-library h2,
body.launch-mode.reference-page .preview-request h2,
body.secondary-page .research-section > .section-intro h2,
body.secondary-page .contact-section > .section-intro h2,
body.secondary-page .survey-page-copy h2 {
  max-width: 22ch;
  font-family: var(--kds-typography-family-display, var(--kds-core-font-family-display, "Manrope Variable")), sans-serif;
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  text-wrap: balance;
}

body.reference-page .principles-heading h2,
body.reference-page .early-access-inner h2 {
  font-family: var(--kds-typography-family-display, var(--kds-core-font-family-display, "Manrope Variable")), sans-serif;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

body.secondary-page .legal-content .section-intro h2 {
  max-width: 26ch;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  line-height: 1.22;
}

body.full-mode.reference-page:not(.secondary-page) main h2 {
  max-width: 22ch;
  font-family: var(--kds-typography-family-display, var(--kds-core-font-family-display, "Manrope Variable")), sans-serif;
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

body.reference-page :is(.resource-grid, .focus-grid) h3 {
  font-size: clamp(1.125rem, 1.45vw, 1.25rem);
  line-height: 1.3;
}

body.reference-page .resource-grid p {
  font-size: 1rem;
  line-height: 1.55;
}

body.reference-page .focus-grid article p {
  font-size: 0.94rem;
  line-height: 1.55;
}

body.reference-page .insight-card p,
body.reference-page .principles-list p {
  font-size: 0.875rem;
  line-height: 1.55;
}

body.reference-page .footer-column a {
  font-size: 0.875rem;
  line-height: 1.5;
  transition: none;
}

body.reference-page .survey-provider-note {
  font-size: 0.875rem;
  line-height: 1.5;
}

body.reference-page .asset-table-wrap:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
}

body.reference-page :is(.published-report-card, .research-feature, .research-status, .report-theme-grid article, .report-method-grid section, .report-context-grid > div, .report-publication) {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 54px color-mix(in srgb, #000 12%, transparent);
}

body.reference-page .published-report-card,
body.reference-page .research-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.7fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(32px, 5vw, 56px);
}

body.reference-page .published-report-card,
body.reference-page :is(.research-feature, .research-status) {
  padding: clamp(24px, 3.5vw, 42px);
}

body.reference-page .published-report-card h3,
body.reference-page .research-overview-grid h3,
body.reference-page :is(.report-method-grid, .report-context-grid, .report-publication) h3 {
  margin: 0 0 16px;
  font-family: var(--kds-typography-family-display, "Manrope Variable"), sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.25;
}

body.reference-page .published-report-card p:not(.eyebrow),
body.reference-page .research-overview-grid p:not(.eyebrow),
body.reference-page .report-introduction p:not(.eyebrow) {
  max-width: 65ch;
  line-height: 1.6;
}

body.reference-page .report-card-note {
  align-self: end;
  margin: 0;
  padding-left: 24px;
  border-left: 2px solid var(--indigo);
  color: var(--muted);
}

body.reference-page :is(.report-actions, .report-hero-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}

body.reference-page :is(.report-actions, .report-hero-actions) .button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.reference-page .report-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.reference-page .report-text-link:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
}

body.reference-page .research-status {
  background: color-mix(in srgb, var(--panel) 88%, var(--indigo));
}

body.reference-page .research-status .report-text-link {
  margin-top: 12px;
}

body.reference-page .report-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(34px, 5vw, 58px);
}

body.reference-page .report-theme-grid article,
body.reference-page .report-method-grid section,
body.reference-page .report-context-grid > div,
body.reference-page .report-publication {
  padding: clamp(24px, 3vw, 36px);
}

body.reference-page :is(.report-method-grid, .report-context-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(34px, 5vw, 58px);
}

body.reference-page .report-theme-grid span {
  display: block;
  margin-bottom: 36px;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

body.reference-page .report-theme-grid h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

body.reference-page .report-theme-grid p,
body.reference-page :is(.report-method-grid, .report-context-grid) p {
  margin-bottom: 0;
  color: var(--muted);
}

body.reference-page .report-source-note {
  margin-top: 24px;
  font-size: 0.82rem;
  line-height: 1.5;
}

body.reference-page :is(.report-source-note a, .report-inline-link) {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.reference-page .report-publication {
  margin-top: 24px;
}

body.reference-page .report-publication dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 42px;
  margin: 26px 0 0;
}

body.reference-page .report-publication dl > div {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

body.reference-page .report-publication dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.reference-page .report-publication dd {
  margin: 7px 0 0;
  line-height: 1.55;
}

body.reference-page .report-publication > p {
  margin: 24px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

body.reference-page .report-publication > p a {
  color: var(--cyan);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

body.reference-page .research-return-link {
  margin-top: 28px;
}

body.launch-mode.reference-page .audience-paths {
  border-top: 1px solid var(--line);
  padding-block: clamp(72px, 9vw, 112px);
}

body.reference-page .audience-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(32px, 5vw, 52px);
}

body.reference-page .audience-path-grid > a {
  display: flex;
  min-height: 282px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(26px, 3.4vw, 42px);
  background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
  box-shadow: 0 20px 55px color-mix(in srgb, #000 11%, transparent);
  color: var(--text);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}

body.reference-page .audience-path-grid > a:hover,
body.reference-page .audience-path-grid > a:focus-visible {
  border-color: var(--indigo);
  transform: translateY(-2px);
}

body.reference-page .audience-path-grid > a > span {
  color: var(--indigo);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.reference-page .audience-path-grid h3 {
  max-width: 24ch;
  margin: 30px 0 12px;
  font-family: var(--kds-typography-family-display, "Manrope Variable"), sans-serif;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.025em;
}

body.reference-page .audience-path-grid p {
  max-width: 52ch;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

body.reference-page .audience-path-grid strong {
  display: inline-flex;
  gap: 8px;
  margin-top: auto;
  color: var(--cyan);
  font-size: 0.95rem;
}

body.reference-page .audience-path-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 30px;
  margin-top: 30px;
}

@media (max-width: 760px) {
  body.reference-page .published-report-card,
  body.reference-page .research-overview-grid,
  body.reference-page .report-theme-grid,
  body.reference-page .report-method-grid,
  body.reference-page .report-context-grid,
  body.reference-page .report-publication dl {
    grid-template-columns: 1fr;
  }

  body.reference-page .report-card-note {
    align-self: start;
  }
}

body.secondary-page :is(.research-section, .contact-section) {
  padding-block: clamp(64px, 7vw, 100px);
}

body.secondary-page:has(:is(.legal-content, .asset-table-wrap, .not-found-actions)) .page-hero {
  padding-bottom: clamp(48px, 5vw, 72px);
}

body.reference-page .mobile-nav {
  display: none;
}

@media (max-width: 1080px) {
  body.reference-page .site-header {
    gap: 12px;
  }

  body.reference-page .header-actions {
    margin-left: auto;
  }

  body.reference-page .mobile-nav {
    position: relative;
    z-index: 1;
    display: block;
    flex: 0 0 auto;
  }

  body.reference-page .mobile-nav summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    list-style: none;
  }

  body.reference-page .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  body.reference-page .mobile-nav summary span {
    font-size: 1.25rem;
    line-height: 1;
  }

  body.reference-page .mobile-nav[open] summary,
  body.reference-page .mobile-nav summary:hover {
    background: color-mix(in srgb, var(--indigo) 10%, var(--panel-strong));
  }

  body.reference-page .mobile-nav summary:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 3px;
  }

  body.reference-page .mobile-nav-links {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 30;
    display: grid;
    width: min(320px, calc(100vw - 32px));
    gap: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    padding: 8px;
    background: var(--panel-strong);
    box-shadow: 0 22px 56px rgb(0 0 0 / 20%);
  }

  body.reference-page .mobile-nav-links a {
    display: flex;
    min-height: 48px;
    align-items: center;
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
  }

  body.reference-page .mobile-nav-links a:is(:hover, :focus-visible),
  body.reference-page .mobile-nav-links a[aria-current="page"] {
    background: color-mix(in srgb, var(--indigo) 10%, var(--panel-strong));
  }

  body.reference-page .mobile-nav-links a:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: -2px;
  }
}

@media (max-width: 430px) {
  body.reference-page .wordmark-image {
    width: 94px;
  }
}

@media (max-width: 340px) {
  body.reference-page .wordmark-image {
    display: none;
  }
}

body.kalarty-page .kalarty-stage {
  display: inline-flex;
  max-width: 600px;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 28px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

body.kalarty-page .kalarty-stage strong {
  color: var(--text);
}

body.kalarty-page .kalarty-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

body.kalarty-page .kalarty-audience-grid article {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 36px);
  background: color-mix(in srgb, var(--panel-strong) 90%, transparent);
  scroll-margin-top: 110px;
}

body.kalarty-page .kalarty-audience-grid article > span,
body.kalarty-page .kalarty-concept-step > span {
  color: var(--indigo);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.kalarty-page .kalarty-audience-grid h3,
body.kalarty-page .kalarty-concept-step h3 {
  margin: 18px 0 10px;
  color: var(--text);
  font-family: var(--kds-typography-family-display, "Manrope Variable"), sans-serif;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 650;
  line-height: 1.3;
}

body.kalarty-page .kalarty-audience-grid p,
body.kalarty-page .kalarty-concept-step p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.6;
}

body.kalarty-page .kalarty-audience-grid p.kalarty-audience-stage {
  max-width: 55ch;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

body.kalarty-page .kalarty-audience-stage strong {
  color: var(--text);
}

body.kalarty-page .kalarty-audience-grid .report-text-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 24px;
}

body.reference-page :is(#survey-form, #contact-form-title) {
  scroll-margin-top: 110px;
}

body.kalarty-page .kalarty-concept {
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(circle at 78% 8%, color-mix(in srgb, var(--indigo) 18%, transparent), transparent 38%),
    color-mix(in srgb, var(--panel) 76%, transparent);
}

body.kalarty-page .kalarty-concept-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 26px);
}

body.kalarty-page .kalarty-concept-flow::before {
  position: absolute;
  top: 31px;
  right: 10%;
  left: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--cyan));
  content: "";
}

body.kalarty-page .kalarty-concept-step {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 22px;
  background: var(--panel-strong);
  box-shadow: 0 20px 48px rgb(0 0 0 / 7%);
}

body.kalarty-page .kalarty-concept-step > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 0.625rem;
  letter-spacing: 0;
}

body.kalarty-page .kalarty-concept figcaption {
  margin-top: 22px;
  color: var(--quiet);
  font-size: 0.8125rem;
  line-height: 1.55;
}

body.kalarty-page .kalarty-next {
  border-top: 1px solid var(--line);
}

body.kalarty-page .kalarty-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 760px) {
  body.reference-page .audience-path-grid {
    grid-template-columns: 1fr;
  }

  body.reference-page .audience-path-grid > a {
    min-height: 0;
  }

  body.kalarty-page .kalarty-audience-grid,
  body.kalarty-page .kalarty-concept-flow {
    grid-template-columns: 1fr;
  }

  body.kalarty-page .kalarty-concept-flow::before {
    display: none;
  }

  body.kalarty-page .kalarty-concept-step {
    min-height: 0;
  }
}

/* The public hero uses one ribbon asset and placement in all three appearances.
   Each appearance adjusts only the overlay and surface colors for legibility. */
body.reference-page:has(#theme-light:checked) {
  --space-black: #f9fbff;
  --slate: #eef3fb;
  --panel: rgb(255 255 255 / 94%);
  --panel-strong: #ffffff;
  --text: #111827;
  --muted: #41506a;
  --quiet: #59677e;
  --line: rgb(25 47 91 / 13%);
  --line-strong: rgb(25 47 91 / 22%);
  --indigo: #3148e6;
  --cyan: #264cdb;
  color-scheme: light;
}

body.reference-page:has(#theme-accessible:checked) {
  --quiet: #40516b;
  color-scheme: light;
}

body.reference-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .hero-composition h1,
body.reference-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .hero-composition h1 em,
body.secondary-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .page-hero h1,
body.private-preview-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .private-preview-copy :is(h1, h1 em) {
  color: #101827;
}

body.reference-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .hero-composition .hero-copy,
body.secondary-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .page-hero .hero-copy,
body.private-preview-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .private-preview-copy .hero-copy {
  color: #34425c;
}

body.reference-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .hero-composition .hero-kicker,
body.reference-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .hero-composition .public-hero-label,
body.secondary-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .page-hero .eyebrow,
body.private-preview-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .private-preview-copy .eyebrow {
  color: #415273;
}

body.private-preview-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .preview-trust-list {
  border-color: var(--line-strong);
}

body.private-preview-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .preview-trust-list p + p {
  border-color: var(--line);
}

body.private-preview-page:is(:has(#theme-light:checked), :has(#theme-accessible:checked)) .preview-trust-list :is(strong, small) {
  color: var(--text);
}

body.reference-page:has(#theme-light:checked) .hero-composition .button-secondary {
  border-color: rgb(31 58 112 / 23%);
  background: rgb(255 255 255 / 80%);
  color: #15213b;
}

body.reference-page:has(#theme-light:checked) .button-primary {
  border-color: #3148e6;
  background: linear-gradient(135deg, #273dde, #4668ef);
  box-shadow: 0 14px 32px rgb(38 76 219 / 18%);
}

body.reference-page:has(#theme-light:checked) .footer-column a {
  color: #40516b;
}

body.reference-page:has(#theme-light:checked) .footer-column a:hover {
  color: #14233d;
}

@media (max-width: 760px) {
  body.reference-page .hero-composition h1,
  body.secondary-page .page-hero h1 {
    font-size: clamp(2.5rem, 10.8vw, 3rem);
    line-height: 1.12;
  }

  body.secondary-page .page-hero {
    min-height: var(--kaldium-public-hero-min-height);
  }

  body.reference-page .hero-composition {
    min-height: var(--kaldium-public-hero-min-height);
  }
}

/* Editorial hero families: one brand asset, three distinct page stories. */
body.about-page .page-hero {
  justify-items: start;
  align-content: center;
  text-align: left;
}

body.about-page .page-hero > :is(.public-hero-label, h1, .hero-copy) {
  justify-self: start;
}

body.about-page .page-hero h1 {
  max-width: 17ch;
}

body.about-page .page-hero .hero-copy {
  max-width: 58ch;
}

body.about-page .page-hero .public-hero-label::before {
  width: 18px;
  flex-basis: 18px;
}

body.about-page .page-hero .public-hero-label::after {
  content: none;
}

body.survey-page .survey-page-layout {
  align-items: start;
}

body.survey-page .survey-disclosure-summary {
  height: auto;
  min-height: 340px;
  align-content: center;
  gap: 16px;
}

body.survey-page .survey-disclosure-summary h3 {
  max-width: 18ch;
  margin-bottom: 14px;
  font-size: clamp(1.875rem, 2.6vw, 2.625rem);
  line-height: 1.15;
  white-space: normal;
}

body.survey-page .survey-disclosure-summary p {
  max-width: 55ch;
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: normal;
}

body.survey-page .survey-disclosure-summary p:last-child {
  margin-bottom: 0;
}

body.research-page .page-hero,
body.kalarty-page .page-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.78fr);
  align-content: center;
  column-gap: clamp(30px, 5vw, 80px);
}

body:is(.research-page, .kalarty-page) .page-hero > :is(.public-hero-label, h1, .hero-copy) {
  grid-column: 1;
}

body:is(.research-page, .kalarty-page) .page-hero h1 {
  max-width: 17ch;
}

body:is(.research-page, .kalarty-page) .page-hero > aside {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 40px);
  background: color-mix(in srgb, var(--panel-strong) 91%, transparent);
  box-shadow: 0 24px 70px rgb(0 0 0 / 10%);
  backdrop-filter: blur(12px);
}

body.research-page .research-hero-feature > span,
body.kalarty-page .kalarty-hero-panel-label {
  color: var(--indigo);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.research-page .research-hero-feature h2 {
  max-width: 17ch;
  margin: 36px 0 12px;
  color: var(--text);
  font-family: var(--kds-typography-family-display, "Manrope Variable"), sans-serif;
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

body.research-page .research-hero-feature p {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 0.92rem;
}

body.research-page .research-hero-feature a,
body.kalarty-page .kalarty-hero-panel a {
  color: var(--cyan);
  font-weight: 750;
  text-decoration: none;
}

body.research-page .research-hero-feature a {
  display: inline-flex;
  gap: 12px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 5px;
}

body:is(.research-page, .kalarty-page) .page-hero aside a:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
}

body.kalarty-page .kalarty-hero-panel-label {
  margin: 0 0 22px;
}

body.kalarty-page .kalarty-hero-panel nav {
  display: grid;
  border-top: 1px solid var(--line);
}

body.kalarty-page .kalarty-hero-panel nav a {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  transition: color 150ms ease, padding-left 150ms ease;
}

body.kalarty-page .kalarty-hero-panel nav a:hover,
body.kalarty-page .kalarty-hero-panel nav a:focus-visible {
  padding-left: 4px;
  color: var(--cyan);
}

body.kalarty-page .kalarty-hero-panel nav a span:first-child {
  color: var(--indigo);
  font-size: 0.8rem;
  font-weight: 800;
}

body.kalarty-page .kalarty-hero-panel .kalarty-stage {
  display: grid;
  max-width: none;
  gap: 6px;
  margin: 24px 0 0;
  border: 0;
  padding: 0;
  background: none;
}

body.reference-page:has(#theme-dark:checked) :is(
  .research-hero-feature > span,
  .kalarty-hero-panel-label,
  .kalarty-hero-panel nav a span:first-child
) {
  color: #aebfff;
}

body.reference-page:has(#theme-dark:checked) .research-hero-feature a,
body.reference-page:has(#theme-dark:checked) .kalarty-hero-panel nav a:is(:hover, :focus-visible) {
  color: #c4d0ff;
}

@media (max-width: 900px) {
  body.research-page .page-hero,
  body.kalarty-page .page-hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    row-gap: 0;
  }

  body:is(.research-page, .kalarty-page) .page-hero > aside {
    width: min(100%, 540px);
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 36px;
  }

}

@media (max-width: 760px) {
  body.reference-page {
    --kaldium-public-hero-min-height: 640px;
  }

  body.survey-page .survey-disclosure-summary {
    min-height: 0;
    padding: 88px 24px 32px;
  }

}

@media (prefers-reduced-motion: reduce) {
  body.kalarty-page .kalarty-hero-panel nav a {
    transition: none;
  }

  body.kalarty-page .kalarty-hero-panel nav a:hover,
  body.kalarty-page .kalarty-hero-panel nav a:focus-visible {
    padding-left: 0;
  }
}

@media (forced-colors: active) {
  body:is(.about-page, .research-page, .kalarty-page) .page-hero::before,
  body:is(.research-page, .kalarty-page) .page-hero > aside {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }
}

.form-optional-details {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.form-optional-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-optional-details summary:hover,
.form-optional-details summary:focus-visible {
  color: var(--text);
}

.form-optional-details summary:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
}

.form-optional-details[open] .form-field {
  margin-top: 14px;
}

/* Public-site analytics choice. The tag is loaded only after permission. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

body.reference-page .footer-settings-button {
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
}

body.reference-page .footer-settings-button:hover,
body.reference-page .footer-settings-button:focus-visible {
  color: var(--text);
}

.analytics-consent-banner[hidden],
.footer-settings-button[hidden],
.analytics-gpc-note[hidden] {
  display: none;
}

.analytics-consent-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  width: min(calc(100% - 32px), 980px);
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-inline: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 22px 24px;
  background: var(--panel-strong);
  box-shadow: 0 20px 65px rgb(0 0 0 / 25%);
  color: var(--text);
  backdrop-filter: blur(20px);
}

.analytics-consent-copy h2,
.analytics-consent-dialog h2,
.analytics-consent-dialog h3 {
  max-width: none;
  margin: 0;
  color: var(--text);
  font-family: inherit;
  letter-spacing: -0.02em;
}

.analytics-consent-copy h2 {
  font-size: 1.1rem;
  line-height: 1.3;
}

.analytics-consent-copy p {
  max-width: 58ch;
  margin: 6px 0 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.analytics-consent-copy a,
.analytics-dialog-actions a {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-consent-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}

.analytics-consent-actions button,
.analytics-dialog-actions button {
  min-height: 44px;
  border: 1px solid var(--indigo);
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--indigo);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
}

.analytics-consent-actions button:hover,
.analytics-dialog-actions button:hover {
  filter: brightness(1.12);
}

.analytics-consent-dialog {
  width: min(calc(100% - 32px), 600px);
  max-height: min(80dvh, 680px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--panel-strong);
  box-shadow: 0 28px 90px rgb(0 0 0 / 32%);
  color: var(--text);
}

.analytics-consent-dialog::backdrop {
  background: rgb(3 7 18 / 66%);
}

.analytics-dialog-heading,
.analytics-purpose-heading,
.analytics-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.analytics-dialog-heading .eyebrow {
  margin: 0 0 5px;
  color: var(--quiet);
  font-size: 0.7rem;
}

.analytics-consent-dialog h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.analytics-dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1.4rem;
}

.analytics-consent-dialog > p,
.analytics-purpose p,
.analytics-purpose small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.analytics-consent-dialog > p {
  margin: 18px 0 22px;
}

.analytics-purpose {
  display: block;
  border-top: 1px solid var(--line-strong);
  padding: 18px 0;
}

.analytics-purpose h3,
.analytics-purpose strong {
  font-size: 1rem;
  font-weight: 750;
}

.analytics-purpose-heading span {
  color: var(--quiet);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-purpose p {
  margin: 7px 0 0;
}

.analytics-purpose-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  cursor: pointer;
}

.analytics-purpose-toggle span {
  display: grid;
  gap: 5px;
}

.analytics-purpose-toggle small {
  display: block;
}

.analytics-purpose-toggle input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--indigo);
}

.analytics-gpc-note {
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
}

.analytics-dialog-actions {
  border-top: 1px solid var(--line-strong);
  padding-top: 18px;
}

:is(.analytics-consent-banner, .analytics-consent-dialog, .footer-settings-button) :focus-visible,
.analytics-dialog-close:focus-visible,
.footer-settings-button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .analytics-consent-banner {
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .analytics-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analytics-dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (forced-colors: active) {
  .analytics-consent-banner,
  .analytics-consent-dialog,
  .analytics-consent-actions button,
  .analytics-dialog-actions button,
  .analytics-dialog-close {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}
