/* Every selector belongs to the opt-in editorial review; the marketing page is unaffected. */
.sg-context-tools,
.sg-context-section-trigger {
  font-family: inherit;
  color: var(--brand-ink, #051343);
  box-sizing: border-box;
}

.sg-context-tools *,
.sg-context-tools *::before,
.sg-context-tools *::after {
  box-sizing: border-box;
}

.sg-context-tools [hidden] {
  display: none !important;
}

.sg-context-tools button,
.sg-context-tools select,
.sg-context-section-trigger {
  font: inherit;
}

.sg-context-launcher,
.sg-context-section-trigger {
  appearance: none;
  border: 1px solid var(--brand-border, #d7e3ef);
  border-radius: 999px;
  background: var(--brand-white, #fff);
  color: var(--brand-primary, #075db3);
  cursor: pointer;
  line-height: 1.2;
  box-shadow: 0 3px 16px rgb(5 19 67 / 9%);
}

.sg-context-launcher {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
}

.sg-context-positioned {
  position: relative;
}

.sg-context-section-trigger {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.sg-context-header-trigger {
  top: calc(100% + 8px);
  right: auto;
  left: 12px;
}

.sg-context-hero-trigger {
  top: 80px;
}

.sg-context-tools button:hover,
.sg-context-section-trigger:hover {
  background: var(--brand-tint, #e3effb);
}

.sg-context-tools :is(button, select):focus-visible,
.sg-context-section-trigger:focus-visible {
  outline: 3px solid var(--brand-accent, #0f82e2);
  outline-offset: 3px;
}

.sg-context-panel {
  position: fixed;
  z-index: 2147483001;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--brand-border, #d7e3ef);
  border-radius: 18px;
  background: var(--brand-white, #fff);
  box-shadow: 0 16px 70px rgb(5 19 67 / 18%);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.sg-context-topbar {
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--brand-border, #d7e3ef);
}

.sg-context-eyebrow {
  color: var(--brand-muted, #59697e);
  font-size: 12px;
  font-weight: 600;
}

.sg-context-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  color: var(--brand-ink, #051343);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.sg-context-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  vertical-align: middle;
}

.sg-context-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px;
}

.sg-context-tools h2,
.sg-context-tools h3,
.sg-context-tools p,
.sg-context-tools dl,
.sg-context-tools dd {
  margin: 0;
}

.sg-context-tools h2 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.4px;
}

.sg-context-overview {
  display: grid;
  gap: 8px;
  margin: 16px 0 22px;
  padding: 14px;
  border-radius: 12px;
  background: var(--brand-surface, #f4f8fd);
  font-size: 13px;
}

.sg-context-overview-title {
  color: var(--brand-navy, #062765);
  font-weight: 600;
}

.sg-context-journey {
  color: var(--brand-primary, #075db3);
  font-size: 12px;
  line-height: 1.7;
}

.sg-context-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
}

.sg-context-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--brand-border, #d7e3ef);
  border-radius: 9px;
  background: var(--brand-white, #fff);
  color: var(--brand-ink, #051343);
  cursor: pointer;
  font-size: 14px;
}

.sg-context-details {
  padding-top: 22px;
  overflow-wrap: anywhere;
}

.sg-context-progress {
  color: var(--brand-muted, #59697e);
  font-size: 12px;
}

.sg-context-tools h3 {
  padding: 4px 0 16px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.sg-context-details dl {
  display: grid;
  gap: 18px;
}

.sg-context-details dt {
  margin: 0 0 4px;
  color: var(--brand-muted, #59697e);
  font-size: 12px;
  font-weight: 600;
}

.sg-context-details dd {
  color: var(--brand-ink, #051343);
  font-size: 14px;
}

.sg-context-proposal {
  padding: 14px;
  border-left: 3px solid var(--brand-primary, #075db3);
  border-radius: 0 9px 9px 0;
  background: var(--brand-surface, #f4f8fd);
}

.sg-context-proposal dd[data-context-field="title"] {
  padding-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.sg-context-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--brand-border, #d7e3ef);
}

.sg-context-pagination button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-primary, #075db3);
  cursor: pointer;
  font-size: 13px;
}

.sg-context-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 600px) {
  .sg-context-panel {
    top: auto;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-height: 72vh;
    max-height: 72dvh;
    border-radius: 16px;
  }

  .sg-context-topbar {
    padding: 12px 16px;
  }

  .sg-context-scroll {
    padding: 16px;
  }

  .sg-context-tools h2 {
    font-size: 21px;
  }

  .sg-context-section-trigger {
    top: 8px;
    right: 8px;
  }

  .sg-context-header-trigger {
    top: calc(100% + 6px);
    right: auto;
    left: 8px;
  }

  .sg-context-hero-trigger {
    top: 72px;
  }
}

@media print {
  .sg-context-tools,
  .sg-context-section-trigger {
    display: none !important;
  }
}
/* Reference detail stays secondary to the visitor's question and the section copy. */
.sg-context-reference {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--brand-muted, #59697e);
}

.sg-context-reference summary {
  cursor: pointer;
  color: var(--brand-navy, #062765);
}

.sg-context-reference p {
  margin: 10px 0 0;
}
