:root {
  --ig-teal: #087e8b;
  --ig-teal-dark: #075c66;
  --ig-teal-soft: #e8f7f7;
  --ig-gold: #d99a16;
  --ig-gold-soft: #fff7df;
  --ig-danger: #9a3412;
  --ig-success: #166534;
}

html {
  font-size: calc(100% + 1pt);
  scroll-behavior: smooth;
}

body {
  min-width: 280px;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.ig-container {
  width: min(calc(100% - 36px), 1120px);
  margin-inline: auto;
}

.ig-main {
  min-width: 0;
}

.ig-section {
  padding: clamp(28px, 5vw, 56px) 0;
}

.ig-section + .ig-section {
  padding-top: 0;
}

.ig-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(8, 126, 139, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, var(--uz-bg) 100%);
}

.ig-card {
  min-width: 0;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--uz-border-neutral);
  border-radius: 16px;
  background: var(--uz-white);
  box-shadow: var(--uz-shadow);
}

.ig-card-accent {
  border-top: 6px solid var(--ig-teal);
}

.ig-eyebrow {
  margin: 0 0 8px;
  color: var(--ig-teal-dark);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ig-title,
.ig-subtitle,
.ig-heading {
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  line-height: 1.16;
}

.ig-title {
  max-width: 18ch;
  margin: 0 0 16px;
  font-size: clamp(2.25rem, 6vw, 4.35rem);
  letter-spacing: -0.045em;
}

.ig-subtitle {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.ig-heading {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
}

.ig-lead {
  max-width: 72ch;
  margin: 0;
  color: var(--uz-muted);
  font-size: clamp(1.04rem, 2vw, 1.2rem);
}

.ig-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.ig-meta {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--uz-border-neutral);
  border-radius: 12px;
  background: #fff;
}

.ig-meta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--uz-blue);
  font-family: var(--uz-font-heading);
}

.ig-meta p {
  margin: 0;
  color: var(--uz-muted);
  font-size: 0.95rem;
}

.ig-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.ig-methodology {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(8, 126, 139, 0.3);
  border-radius: 12px;
  background: var(--ig-teal-soft);
}

.ig-methodology .ig-heading {
  margin-bottom: 6px;
}

.ig-methodology div > p {
  margin: 0;
  color: var(--uz-muted);
}

.ig-methodology-detail {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 22px;
}

.ig-methodology-detail div > p + p {
  margin-top: 16px;
}

.ig-more-info {
  padding-bottom: clamp(36px, 6vw, 70px);
}

.ig-reference {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 5px solid var(--ig-gold);
  border-radius: 0 8px 8px 0;
  background: var(--ig-gold-soft);
}

.ig-reference p {
  margin: 0;
}

.ig-reference p + p {
  margin-top: 6px;
}

.ig-funding-list {
  margin: 8px 0 0;
  padding-left: 1.35em;
}

.ig-funding-list li + li {
  margin-top: 8px;
}

.ig-funding-list + p {
  margin-top: 10px;
}

.ig-reference-compact {
  display: inline-block;
}

.ig-selection-form {
  display: grid;
  gap: 26px;
}

.ig-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ig-legend {
  width: 100%;
  margin-bottom: 12px;
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
  font-size: 1.2rem;
  font-weight: 900;
}

.ig-legend-number {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--ig-teal);
  font-size: 0.95rem;
}

.ig-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ig-choice-grid-scales {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ig-select-card {
  min-width: 0;
  min-height: 112px;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 2px solid var(--uz-border-neutral);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.ig-select-card:hover {
  border-color: var(--ig-teal);
  transform: translateY(-2px);
}

.ig-select-card:focus-within {
  outline: 3px solid var(--uz-focus);
  outline-offset: 3px;
}

.ig-select-card:has(input:checked) {
  border-color: var(--ig-teal);
  background: var(--ig-teal-soft);
  box-shadow: inset 0 0 0 1px var(--ig-teal);
}

.ig-select-card input {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--ig-teal-dark);
}

.ig-select-card strong {
  display: block;
  color: var(--uz-text);
  font-family: var(--uz-font-heading);
}

.ig-select-card small {
  display: block;
  margin-top: 5px;
  color: var(--uz-muted);
  line-height: 1.45;
}

.ig-summary {
  margin: 0;
  padding: 14px 16px;
  border-left: 5px solid var(--ig-teal);
  border-radius: 0 8px 8px 0;
  background: var(--ig-teal-soft);
}

.ig-notice,
.ig-error {
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
}

.ig-notice {
  border: 1px solid rgba(8, 126, 139, 0.35);
  background: var(--ig-teal-soft);
}

.ig-error {
  border: 1px solid rgba(154, 52, 18, 0.35);
  border-left: 5px solid var(--ig-danger);
  color: var(--ig-danger);
  background: rgba(154, 52, 18, 0.07);
  font-weight: 800;
}

.ig-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.ig-actions-split {
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px dotted var(--uz-border);
}

.ig-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid var(--uz-blue);
  border-radius: 8px;
  color: #fff;
  background: var(--uz-blue);
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ig-btn:hover {
  border-color: var(--uz-blue-dark);
  color: #fff;
  background: var(--uz-blue-dark);
  text-decoration: none;
}

.ig-btn-secondary {
  color: var(--uz-blue);
  background: #fff;
}

.ig-btn-secondary:hover {
  color: var(--uz-blue-dark);
  background: var(--uz-soft);
}

.ig-btn:focus-visible,
.ig-text-link:focus-visible {
  outline: 3px solid var(--uz-focus);
  outline-offset: 3px;
}

.ig-text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.ig-progress-wrap {
  margin-bottom: 22px;
}

.ig-progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.ig-progress-row p {
  margin: 0;
  font-weight: 900;
}

.ig-progress-row span {
  color: var(--uz-muted);
  font-size: 0.92rem;
}

.ig-progress {
  width: 100%;
  height: 12px;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: var(--ig-teal);
  background: var(--uz-soft);
}

.ig-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--uz-soft);
}

.ig-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ig-teal), #1ca2a7);
}

.ig-progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ig-teal), #1ca2a7);
}

.ig-context-list,
.ig-response-key {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ig-context-list li,
.ig-response-key li {
  position: relative;
  padding-left: 28px;
}

.ig-context-list li::before,
.ig-response-key li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ig-success);
  font-weight: 900;
}

.ig-block-heading {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dotted var(--uz-border);
}

.ig-block-code {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--ig-teal-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.ig-questions {
  display: grid;
  gap: 18px;
}

.ig-question {
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--uz-border-neutral);
  border-radius: 12px;
  background: #fff;
}

.ig-question[aria-invalid="true"] {
  border-color: var(--ig-danger);
  box-shadow: 0 0 0 3px rgba(154, 52, 18, 0.13);
}

.ig-question legend {
  max-width: 100%;
  padding: 0;
  color: var(--uz-text);
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ig-question-code {
  display: inline-block;
  margin-right: 6px;
  color: var(--ig-teal-dark);
  font-weight: 900;
}

.ig-question-tools {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.ig-help-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 13px;
  border: 1px solid var(--uz-border);
  border-radius: 999px;
  color: var(--uz-blue);
  background: var(--uz-soft);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.ig-help-button:hover {
  border-color: var(--ig-teal);
  color: var(--ig-teal-dark);
  background: var(--ig-teal-soft);
}

.ig-help-button:focus-visible {
  outline: 3px solid var(--uz-focus);
  outline-offset: 2px;
}

.ig-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.ig-option {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 7px;
  border: 1px solid var(--uz-border-neutral);
  border-radius: 8px;
  color: var(--uz-muted);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.ig-option:hover {
  border-color: var(--ig-teal);
  background: var(--ig-teal-soft);
}

.ig-option:focus-within {
  outline: 3px solid var(--uz-focus);
  outline-offset: 2px;
}

.ig-option:has(input:checked) {
  border-color: var(--ig-teal-dark);
  color: var(--ig-teal-dark);
  background: var(--ig-teal-soft);
  box-shadow: inset 0 0 0 1px var(--ig-teal-dark);
}

.ig-option input {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--ig-teal-dark);
}

.ig-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ig-option-np {
  background: #f5f6f8;
}

.ig-dialog {
  width: min(calc(100% - 32px), 720px);
  max-width: 720px;
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--uz-border);
  border-radius: 16px;
  color: var(--uz-text);
  background: #fff;
  box-shadow: 0 24px 70px rgba(23, 43, 82, 0.28);
}

.ig-dialog::backdrop {
  background: rgba(23, 43, 82, 0.66);
  backdrop-filter: blur(3px);
}

.ig-dialog-panel {
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 4vw, 32px);
}

.ig-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dotted var(--uz-border);
}

.ig-dialog-head .ig-eyebrow,
.ig-dialog-head .ig-subtitle {
  margin-bottom: 4px;
}

.ig-dialog-x {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--uz-border);
  border-radius: 50%;
  color: var(--uz-blue);
  background: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.ig-dialog-x:hover {
  border-color: var(--ig-teal);
  background: var(--ig-teal-soft);
}

.ig-dialog-content {
  min-height: 100px;
  overflow-y: auto;
  padding: 18px 4px 4px 0;
  line-height: 1.65;
}

.ig-dialog-content p {
  margin: 0;
}

.ig-dialog-content p + p {
  margin-top: 14px;
}

.ig-external-card {
  display: grid;
  gap: 16px;
}

.ig-results-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--uz-blue), #31558f);
}

.ig-results-hero h2,
.ig-results-hero p {
  color: #fff;
}

.ig-results-hero h2 {
  margin: 0 0 6px;
  font-family: var(--uz-font-heading);
}

.ig-results-hero p {
  margin: 0;
  opacity: 0.9;
}

.ig-results-hero .ig-scale-caption {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.ig-score-orb {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border: 8px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-align: center;
}

.ig-score-orb strong {
  display: block;
  font-family: var(--uz-font-heading);
  font-size: 2.2rem;
  line-height: 1;
}

.ig-score-orb span {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 800;
}

.ig-block-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ig-result-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--uz-border-neutral);
  border-radius: 12px;
  background: #fff;
}

.ig-result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ig-result-topline strong {
  color: var(--uz-blue);
}

.ig-result-value {
  flex: 0 0 auto;
  font-family: var(--uz-font-heading);
  font-size: 1.25rem;
  font-weight: 900;
}

.ig-score-track {
  position: relative;
  height: 10px;
  margin: 16px 6px 0;
  border-radius: 999px;
  background: var(--uz-soft);
}

.ig-score-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ig-teal), #36a8a8);
}

.ig-score-marker {
  width: 16px;
  height: 16px;
  position: absolute;
  top: 50%;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ig-teal-dark);
  box-shadow: 0 0 0 2px var(--ig-teal-dark);
  transform: translate(-50%, -50%);
}

.ig-score-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--uz-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.ig-feedback {
  margin-top: 22px;
  padding: 22px;
  border: 2px dashed var(--ig-gold);
  border-radius: 14px;
  background: var(--ig-gold-soft);
  text-align: center;
}

.ig-feedback h2 {
  margin: 0 0 8px;
  font-family: var(--uz-font-heading);
  font-size: 1.2rem;
}

.ig-feedback p {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ig-method {
  margin-top: 20px;
  padding: 16px;
  border-left: 5px solid var(--uz-border);
  background: var(--uz-bg);
}

.ig-method p {
  margin: 0;
}

.ig-method p + p {
  margin-top: 8px;
}

.ig-site-title {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .ig-meta-grid,
  .ig-choice-grid {
    grid-template-columns: 1fr;
  }

  .ig-choice-grid-scales,
  .ig-block-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ig-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ig-container {
    width: min(calc(100% - 28px), 1120px);
  }

  .ig-section {
    padding: 22px 0;
  }

  .ig-card {
    padding: 20px;
    border-radius: 12px;
  }

  .ig-title {
    font-size: clamp(2.1rem, 13vw, 3.1rem);
  }

  .ig-choice-grid-scales,
  .ig-block-results {
    grid-template-columns: 1fr;
  }

  .ig-select-card {
    min-height: 0;
  }

  .ig-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ig-results-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ig-dialog {
    width: min(calc(100% - 20px), 720px);
    max-height: 90vh;
    border-radius: 12px;
  }

  .ig-dialog-panel {
    max-height: 90vh;
  }

  .ig-actions,
  .ig-actions-split,
  .ig-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ig-btn,
  .ig-text-link,
  .ig-hero-actions .ig-btn {
    width: 100%;
  }

  .ig-progress-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .ig-site-title {
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .ig-methodology {
    grid-template-columns: 1fr;
  }

  .ig-options {
    grid-template-columns: 1fr;
  }

  .ig-option {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ig-select-card {
    transition: none;
  }

  .ig-select-card:hover {
    transform: none;
  }
}

@media (forced-colors: active) {
  .ig-select-card:has(input:checked),
  .ig-option:has(input:checked) {
    outline: 3px solid CanvasText;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ig-actions,
  .skip-link {
    display: none !important;
  }

  .ig-section {
    padding: 0;
  }

  .ig-card {
    border: 0;
    box-shadow: none;
  }
}
