/* Icon Software labs */
/* Ensure bilingual toggles work even if a page misses services/styles data-lang rules */
[data-lang="en"],
[data-lang="ar"] {
  display: none !important;
}
html[lang="en"] [data-lang="en"]:not([hidden]),
html[lang="ar"] [data-lang="ar"]:not([hidden]) {
  display: revert !important;
}
[data-lang][hidden] {
  display: none !important;
}

.lab-hub-list {
  display: grid;
  gap: 2rem;
  max-width: 52rem;
}
.lab-hub-item h2 {
  margin: 0.35rem 0 0.65rem;
}
.lab-hub-item h2 a {
  color: inherit;
  text-decoration: none;
}
.lab-hub-item h2 a:hover {
  color: #1d8fa3;
}
.lab-hub-item p {
  color: var(--text-soft, #5a6570);
  margin: 0 0 1rem;
  max-width: 40rem;
  line-height: 1.65;
}
.lab-banner {
  max-width: 52rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, #1d8fa3 35%, transparent);
  background: color-mix(in srgb, #1d8fa3 10%, transparent);
  color: var(--text-soft, #5a6570);
  font-size: 14px;
  line-height: 1.6;
}
.lab-sets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
}
.lab-set {
  border: 1px solid var(--line, rgba(29, 143, 163, 0.22));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.lab-set[aria-pressed="true"] {
  background: color-mix(in srgb, #1d8fa3 22%, transparent);
  border-color: #1d8fa3;
  font-weight: 600;
}
.lab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.75rem 0 1rem;
}
.lab-chip {
  border: 1px solid var(--line, rgba(29, 143, 163, 0.22));
  background: color-mix(in srgb, #1d8fa3 8%, transparent);
  color: #1d8fa3;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lab-form {
  display: grid;
  gap: 10px;
  max-width: 40rem;
}
.lab-form textarea,
.lab-form input,
.lab-form select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(29, 143, 163, 0.22));
  padding: 12px 14px;
  font: inherit;
  background: color-mix(in srgb, var(--paper, #eef4f5) 8%, transparent);
  color: inherit;
}
html.light .lab-form textarea,
html.light .lab-form input,
html.light .lab-form select {
  background: #fff;
}
.lab-answer {
  margin-top: 1.25rem;
  max-width: 48rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(29, 143, 163, 0.22));
  line-height: 1.7;
  white-space: pre-wrap;
}
.lab-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.85rem;
}
.lab-cite {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(29, 143, 163, 0.22));
  background: color-mix(in srgb, #1d8fa3 10%, transparent);
  max-width: 100%;
}
.lab-cite strong { display: block; margin-bottom: 2px; }
.lab-cite span { opacity: 0.75; font-size: 11px; }
.lab-steps { max-width: 40rem; }
.lab-step-label {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}
.lab-brief {
  max-width: 48rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--line, rgba(29, 143, 163, 0.22));
  background: color-mix(in srgb, #1d8fa3 6%, transparent);
}
.lab-brief h3 { margin: 1rem 0 0.4rem; font-size: 1rem; }
.lab-brief h3:first-child { margin-top: 0; }
.lab-brief ul { margin: 0; padding-inline-start: 1.2rem; color: var(--text-soft, #5a6570); line-height: 1.7; }
.lab-error { color: #c44; margin-top: 0.75rem; font-size: 14px; }
.lab-status { font-size: 13px; opacity: 0.7; margin-top: 0.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Scroll case study */
.scroll-story .story-section {
  opacity: 0.35;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  margin: 2.5rem 0;
}
.scroll-story .story-section.is-in {
  opacity: 1;
  transform: none;
}
.scroll-story .story-metric {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  color: #1d8fa3;
  line-height: 1.1;
  margin: 0.5rem 0 0.75rem;
}
.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0.65rem 0 0.85rem;
  font-size: 12px;
  color: var(--text-soft, #5a6570);
}
.proof-row span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(29, 143, 163, 0.18));
  background: color-mix(in srgb, #1d8fa3 6%, transparent);
}
.proof-method {
  font-size: 12.5px;
  color: var(--text-soft, #5a6570);
  margin: 0.5rem 0 0.85rem;
  line-height: 1.55;
  max-width: 36rem;
}

@media print {
  .top-nav, .icon-chat, .grain, .lab-form button, .cta-row { display: none !important; }
  .lab-brief { border: 1px solid #ccc; background: #fff; color: #111; }
}
