/* ============================================================
   NEW AI HEALTH
   COMPANY FAMILY

   Canonical stylesheet:
   /themes/css/companies.css

   Depends on:
   /themes/css/system.css
   /themes/css/styles.css

   Current scope:
   Representative company-profile surface.

   Future scope:
   Company directory index after profile validation.
   ============================================================ */


/* ============================================================
   COMPANY DIRECTORY INDEX
   ============================================================ */

.page-companies-index .companies-index {
  padding-block:
    clamp(3.75rem, 7vw, 5.25rem)
    clamp(3.75rem, 7vw, 5.25rem);
}

/* Index header */

.companies-index-header {
  max-width: 46rem;
}

.companies-index-eyebrow {
  margin: 0 0 0.8rem;

  color: var(--red);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.companies-index-title {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 6.5vw, 4.65rem);
  font-weight: 680;
  letter-spacing: var(--tracking-display);
  line-height: 0.96;
  text-wrap: balance;
}

.companies-index-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;

  margin: 1rem 0 0;

  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.035em;
  line-height: 1.55;
}

.companies-index-taxonomy span {
  color: var(--divider);
}

.companies-index-summary {
  max-width: 42rem;
  margin: 1.65rem 0 0;

  color: var(--text);
  font-size: clamp(1rem, 1.8vw, 1.08rem);
  line-height: 1.7;
}

.companies-index-boundary {
  max-width: 43rem;
  margin: 1.7rem 0 0;
  padding: 1.15rem 1.3rem;

  border: 1px solid rgba(255, 31, 31, 0.1);
  border-radius: 1rem;

  background: var(--peach);
}

.companies-index-boundary p {
  margin: 0;

  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.65;
}


/* Shared section structure */

.companies-index-divider {
  width: 100%;
  height: 1px;

  margin-block: clamp(3.25rem, 7vw, 4.75rem);

  background: var(--divider);
}

.companies-section-header {
  max-width: 46rem;
}

.companies-section-header h2 {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.8vw, 2.5rem);
  font-weight: 660;
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  text-wrap: balance;
}

.companies-section-header > p {
  max-width: 43rem;
  margin: 0.9rem 0 0;

  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.68;
}


/* Sector navigation */

.companies-sector-overview {
  display: grid;
  gap: clamp(1.8rem, 4vw, 2.65rem);
}

.companies-sector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.companies-sector-card {
  display: flex;
  min-width: 0;
  min-height: 13.5rem;
  flex-direction: column;

  padding: 1.4rem;

  border: 1px solid var(--border);
  border-radius: var(--radius-card);

  background: var(--surface);
  color: var(--text);
  text-decoration: none;

  box-shadow: var(--shadow-soft);

  transition:
    border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-standard) var(--ease-standard),
    transform var(--duration-standard) var(--ease-out);
}

.companies-sector-card:hover,
.companies-sector-card:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;

  box-shadow:
    var(--shadow-soft),
    0 12px 30px rgba(20, 27, 34, 0.05);

  transform: translateY(-2px);
}

.companies-sector-card:focus-visible {
  outline: 3px solid var(--blue-focus);
  outline-offset: 4px;
}

.companies-sector-card h3 {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.12;
  text-wrap: balance;
}

.companies-sector-card p {
  margin: 0.8rem 0 0;

  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.62;
}

.companies-sector-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  margin-top: auto;
  padding-top: 1.25rem;

  color: var(--blue);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;

  transition:
    color var(--duration-fast) var(--ease-standard);
}

.companies-sector-card-action > span {
  color: var(--red);
  font-size: 0.9rem;

  transition:
    transform var(--duration-fast) var(--ease-out);
}

.companies-sector-card:hover
  .companies-sector-card-action,
.companies-sector-card:focus-visible
  .companies-sector-card-action {
  color: var(--red);
}

.companies-sector-card:hover
  .companies-sector-card-action > span,
.companies-sector-card:focus-visible
  .companies-sector-card-action > span {
  transform: translateY(2px);
}

.companies-sector-definitions {
  max-width: 43rem;
  margin: 0;

  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.65;
}

.companies-sector-definitions a {
  color: var(--blue);
  font-weight: var(--font-weight-semibold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.companies-sector-definitions a:hover,
.companies-sector-definitions a:focus-visible {
  color: var(--red);
}


/* Grouped company directory */

.companies-directory {
  display: grid;
}

.companies-directory > .companies-section-header {
  margin-bottom: clamp(2.2rem, 5vw, 3.2rem);
}

.companies-directory-group {
  scroll-margin-top: 2rem;
}

.companies-directory-group +
.companies-directory-group {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  padding-top: clamp(3.5rem, 7vw, 5rem);

  border-top: 1px solid var(--divider);
}

.companies-directory-group-header {
  max-width: 44rem;
  margin-bottom: 1.55rem;
}

.companies-directory-group-kicker {
  margin: 0 0 0.55rem;

  color: var(--text-soft);
  font-size: 0.67rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.companies-directory-group-header h3 {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.08;
  text-wrap: balance;
}

.companies-directory-group-header > p:last-child {
  max-width: 42rem;
  margin: 0.7rem 0 0;

  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.companies-directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.company-directory-card {
  min-width: 0;
}

.company-directory-link {
  display: flex;
  min-height: 16.5rem;
  flex-direction: column;

  padding: 1.35rem;

  border: 1px solid var(--border);
  border-radius: var(--radius-card);

  background: var(--surface);
  color: var(--text);
  text-decoration: none;

  box-shadow: var(--shadow-soft);

  transition:
    border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-standard) var(--ease-standard),
    transform var(--duration-standard) var(--ease-out);
}

.company-directory-link:hover,
.company-directory-link:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;

  box-shadow:
    var(--shadow-soft),
    0 12px 30px rgba(20, 27, 34, 0.05);

  transform: translateY(-2px);
}

.company-directory-link:focus-visible {
  outline: 3px solid var(--blue-focus);
  outline-offset: 4px;
}

.company-directory-topline {
  display: flex;
  min-height: 2.25rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.company-directory-category {
  min-width: 0;
  margin: 0;
  padding-top: 0.2rem;

  color: var(--text-soft);
  font-size: 0.61rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.115em;
  line-height: 1.45;
  text-transform: uppercase;
}

.company-directory-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 0.65rem;

  background: var(--surface);
  box-shadow: var(--shadow-soft);

  transition:
    border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-out);
}

.company-directory-mark img {
  display: block;
  width: 1.35rem;
  height: 1.35rem;

  object-fit: contain;
}

.company-directory-link:hover
  .company-directory-mark,
.company-directory-link:focus-visible
  .company-directory-mark {
  border-color: var(--border-hover);
  background: var(--surface);
  transform: translateY(-1px);
}

.company-directory-title {
  margin: 1.15rem 0 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.08;
  text-wrap: balance;
}

.company-directory-blurb {
  margin: 0.75rem 0 0;

  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.62;
}

.company-directory-cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.4rem;

  margin-top: auto;
  padding-top: 1.25rem;

  color: var(--blue);
  font-size: 0.74rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.25;

  transition:
    color var(--duration-fast) var(--ease-standard);
}

.company-directory-cta-arrow {
  color: var(--red);
  font-size: 0.92rem;
  line-height: 1;

  transition:
    transform var(--duration-fast) var(--ease-out);
}

.company-directory-link:hover
  .company-directory-cta,
.company-directory-link:focus-visible
  .company-directory-cta {
  color: var(--red);
}

.company-directory-link:hover
  .company-directory-cta-arrow,
.company-directory-link:focus-visible
  .company-directory-cta-arrow {
  transform: translateX(3px);
}


/* Company index responsive behavior */

@media (max-width: 980px) {
  .companies-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-directory-link {
    min-height: 15.5rem;
  }
}

@media (max-width: 820px) {
  .companies-sector-grid {
    grid-template-columns: 1fr;
  }

  .companies-sector-card {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .page-companies-index .companies-index {
    padding-block:
      clamp(2.75rem, 8vw, 3.75rem)
      4.75rem;
  }

  .companies-index-divider {
    margin-block: 3rem;
  }

  .companies-index-boundary {
    padding: 1.05rem 1.1rem;
  }

  .companies-directory-group +
  .companies-directory-group {
    margin-top: 3.25rem;
    padding-top: 3.25rem;
  }
}

@media (max-width: 620px) {
  .companies-directory-grid {
    grid-template-columns: 1fr;
  }

  .company-directory-link {
    min-height: 14rem;
  }
}

@media (max-width: 520px) {
  .companies-index-title {
    font-size: clamp(2.75rem, 15vw, 3.8rem);
  }

  .companies-index-taxonomy {
    display: block;
  }

  .companies-index-taxonomy span {
    margin-inline: 0.25rem;
  }

  .companies-sector-card,
  .company-directory-link {
    padding: 1.2rem;
  }

  .company-directory-mark {
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
  }

  .company-directory-mark img {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html:has(body.page-companies-index) {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.page-companies-index) {
    scroll-behavior: auto;
  }

  .companies-sector-card,
  .company-directory-link,
  .companies-sector-card-action > span,
  .company-directory-mark,
  .company-directory-cta-arrow {
    transition: none;
  }
}

/* ============================================================
   PROFILE SHELL
   ============================================================ */

.page-company-profile .company-profile {
  width: min(100%, var(--reading-width));
  margin-inline: auto;
  padding-block:
    clamp(2.75rem, 6vw, 4.75rem)
    clamp(4rem, 8vw, 6rem);
}


/* ============================================================
   PROFILE NAVIGATION
   ============================================================ */

.company-profile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);

  margin: 0 0 var(--space-6);
}

.company-profile-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.2;
  text-decoration: none;

  transition:
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-out);
}

.company-profile-nav-link:hover,
.company-profile-nav-link:focus-visible {
  color: var(--red);
  text-decoration: none;
}

.company-profile-nav-link:hover:first-child,
.company-profile-nav-link:focus-visible:first-child {
  transform: translateX(-2px);
}

.company-profile-nav-link:hover:last-child,
.company-profile-nav-link:focus-visible:last-child {
  transform: translateX(2px);
}

.company-profile-nav-link:focus-visible {
  border-radius: var(--radius-sm);
  outline: 2px solid var(--blue-focus);
  outline-offset: 4px;
}

.company-profile-nav-arrow {
  font-size: 1.15rem;
  line-height: 1;
}

.profile-label-full {
  display: inline;
}

.profile-label-short {
  display: none;
}


/* ============================================================
   PROFILE HEADER
   ============================================================ */

.company-header {
  margin: 0 0 clamp(3rem, 7vw, 4.5rem);
  padding: clamp(1.65rem, 4vw, 2.35rem);

  border: 1px solid var(--border);
  border-radius: 28px;

  background: var(--surface-frosted);

  box-shadow:
    0 1px 2px rgba(20, 27, 34, 0.018),
    0 10px 30px rgba(20, 27, 34, 0.028);
}

.company-header-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.company-header-mark {
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 0.75rem;

  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-soft);

  transition:
    border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-out);
}

.company-header-mark img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;

  object-fit: contain;
}

.company-header-mark:hover,
.company-header-mark:focus-visible {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  box-shadow:
    var(--shadow-soft),
    0 8px 24px rgba(20, 27, 34, 0.06);
  transform: translateY(-1px);
  text-decoration: none;
}

.company-header-mark:focus-visible {
  outline: 3px solid var(--blue-focus);
  outline-offset: 3px;
}

.company-title {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  font-weight: 680;
  letter-spacing: var(--tracking-display);
  line-height: 0.98;
  text-wrap: balance;
}

.company-summary {
  max-width: 44rem;
  margin: var(--space-6) 0 0;

  color: var(--text);
  font-size: clamp(1rem, 1.8vw, 1.075rem);
  font-weight: var(--font-weight-regular);
  line-height: 1.65;
}

.company-tagline-secondary {
  margin: var(--space-3) 0 0;

  color: var(--text-soft);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
}


/* ============================================================
   SHARE UTILITY
   ============================================================ */

.company-share-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;

  margin-top: var(--space-5);
}

.company-copy-link-button {
  appearance: none;
  display: inline-flex;
  min-height: 2rem;
  align-items: center;

  padding: 0.36rem 0.72rem;

  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);

  background: var(--surface);
  color: var(--text-soft);

  font: inherit;
  font-size: 0.72rem;
  font-weight: var(--font-weight-medium);
  line-height: 1;

  cursor: pointer;

  transition:
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard);
}

.company-copy-link-button:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--text);
}

.company-copy-link-button:focus-visible {
  outline: 2px solid var(--blue-focus);
  outline-offset: 3px;
}

.company-share-icon-link {
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: var(--text-soft);
  opacity: 0.72;
  text-decoration: none;

  transition:
    color var(--duration-fast) var(--ease-standard),
    opacity var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard);
}

.company-share-icon-link:hover,
.company-share-icon-link:focus-visible {
  background: var(--surface-hover);
  color: var(--red);
  opacity: 1;
  text-decoration: none;
}

.company-share-icon-link:focus-visible {
  outline: 2px solid var(--blue-focus);
  outline-offset: 2px;
}

.company-share-icon-link img,
.company-share-icon {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.company-share-icon-link[data-share-x] img,
.company-share-icon-link[data-share-x] .company-share-icon {
  display: none;
}

.company-share-icon-link[data-share-x]::before {
  display: block;
  content: "𝕏";

  color: currentColor;
  font-family:
    "Cambria Math",
    "Segoe UI Symbol",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;

  transform: translateY(1px);
}

.company-copy-toast {
  color: var(--text-soft);
  font-size: 0.7rem;
  line-height: 1;

  opacity: 0;
  pointer-events: none;
  transform: translateY(1px);

  transition:
    opacity var(--duration-standard) var(--ease-standard),
    transform var(--duration-standard) var(--ease-out);
}

.company-copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   WEBSITE SNAPSHOT
   ============================================================ */

.company-website-snapshot {
  margin: clamp(3rem, 7vw, 4.25rem) 0;
  padding: clamp(1.35rem, 4vw, 1.9rem);

  border: 1px solid var(--border);
  border-left: 3px solid rgba(47, 111, 159, 0.58);
  border-radius: var(--radius-card);

  background: var(--surface);

  box-shadow: var(--shadow-soft);
}

.company-website-snapshot-gallery {
  width: 100%;
}

.company-snapshot-copy {
  max-width: 44rem;
  margin-bottom: var(--space-6);
}

.company-snapshot-kicker {
  margin: 0 0 var(--space-2);

  color: var(--red);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.company-snapshot-copy h2 {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.08;
}

.company-snapshot-copy p {
  max-width: 42rem;
  margin: var(--space-3) 0 0;

  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.company-snapshot-hint {
  margin-top: var(--space-3) !important;

  color: var(--text-faint) !important;
  font-size: var(--text-sm) !important;
  font-style: italic;
}

.company-snapshot-hint::before {
  color: var(--blue);
  content: "↗ ";
  font-style: normal;
}

.company-snapshot-frame {
  margin: 0;
  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  background: var(--surface-soft);
}

.company-snapshot-frame img {
  display: block;
  width: 100%;
}

.company-snapshot-frame figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);

  padding: 0.75rem 0.9rem;

  border-top: 1px solid var(--border);

  background: var(--surface);
  color: var(--text-soft);

  font-size: var(--text-sm);
  line-height: 1.45;
}

.company-snapshot-frame figcaption a {
  flex-shrink: 0;

  color: var(--text);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.company-snapshot-frame figcaption a:hover,
.company-snapshot-frame figcaption a:focus-visible {
  color: var(--red);
  text-decoration: underline;
}

.company-website-snapshot-gallery .company-snapshot-primary {
  margin-bottom: var(--space-4);
}

.company-snapshot-primary img {
  max-height: 520px;
  object-fit: cover;
  object-position: top center;
}

.company-snapshot-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
}

.company-snapshot-secondary .company-snapshot-zoom {
  height: 170px;
}

.company-snapshot-secondary .company-snapshot-zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.company-snapshot-secondary figcaption {
  min-height: 42px;
  padding: 0.65rem 0.75rem;
  font-size: 0.78rem;
}

.company-snapshot-zoom {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;

  border: 0;
  background: transparent;

  cursor: zoom-in;
}

.company-snapshot-zoom img {
  display: block;
  width: 100%;
  height: auto;
}

.company-snapshot-zoom:focus-visible {
  position: relative;
  z-index: 1;

  outline: 3px solid var(--blue-focus);
  outline-offset: -3px;
}


/* ============================================================
   SNAPSHOT DIALOG
   ============================================================ */

.company-snapshot-lightbox {
  width: min(96vw, 1280px);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;

  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);

  background: var(--surface);
  color: var(--text);

  box-shadow:
    0 24px 80px rgba(5, 5, 5, 0.28);
}

.company-snapshot-lightbox::backdrop {
  background: rgba(5, 5, 5, 0.76);
  backdrop-filter: blur(3px);
}

.company-snapshot-lightbox figure {
  margin: 0;
}

.company-snapshot-lightbox img {
  display: block;
  width: 100%;
  max-height: 84vh;

  object-fit: contain;

  background: var(--surface-soft);
}

.company-snapshot-lightbox figcaption {
  padding: 0.8rem 1rem;

  border-top: 1px solid var(--border);

  color: var(--text-soft);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.company-snapshot-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;

  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  place-items: center;

  border: 1px solid var(--border-strong);
  border-radius: 50%;

  background: var(--surface-frosted-strong);
  color: var(--text);

  font: inherit;
  font-size: 1.3rem;
  line-height: 1;

  cursor: pointer;
}

.company-snapshot-lightbox-close:hover {
  color: var(--red);
}

.company-snapshot-lightbox-close:focus-visible {
  outline: 3px solid var(--blue-focus);
  outline-offset: 2px;
}


/* ============================================================
   COMPANY DETAILS
   ============================================================ */

.company-details-snapshot {
  margin: clamp(3rem, 7vw, 4rem) 0;
  padding-top: clamp(1.5rem, 4vw, 2rem);

  border-top: 1px solid var(--divider);
}

.company-details-header {
  margin-bottom: var(--space-6);
}

.company-details-kicker {
  margin: 0 0 var(--space-2);

  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.company-details-header h2 {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
}

.company-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem 2rem;

  margin: 0;
}

.company-detail-item {
  min-width: 0;
}

.company-detail-item dt {
  margin: 0 0 0.4rem;

  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.company-detail-item dd {
  margin: 0;

  color: var(--text);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.company-detail-item a {
  color: var(--text);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.company-detail-item a:hover,
.company-detail-item a:focus-visible {
  color: var(--red);
  text-decoration: underline;
}

.company-detail-references {
  margin-top: var(--space-8);
}

.company-detail-references-label {
  margin: 0 0 var(--space-3);

  color: var(--blue);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.company-detail-reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.company-detail-reference-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  padding: 0.45rem 0.65rem;

  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  background: var(--surface-soft);
  color: var(--text);

  font-size: 0.86rem;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;

  transition:
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    background var(--duration-fast) var(--ease-standard);
}

.company-detail-reference-link img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.82;
}

.company-detail-reference-link:hover,
.company-detail-reference-link:focus-visible {
  border-color: rgba(255, 31, 31, 0.3);
  background: var(--surface-hover);
  color: var(--red);
  text-decoration: none;
}

.company-detail-reference-link:focus-visible {
  outline: 2px solid var(--blue-focus);
  outline-offset: 3px;
}

.company-detail-reference-link:hover img,
.company-detail-reference-link:focus-visible img {
  opacity: 1;
}


/* ============================================================
   EDITORIAL READOUT
   ============================================================ */

.company-editorial-readout {
  margin: 0 0 clamp(3rem, 7vw, 4rem);
  padding: clamp(1.8rem, 5vw, 2.4rem) 0;

  border-top: 1px solid rgba(255, 31, 31, 0.18);
  border-bottom: 1px solid rgba(255, 31, 31, 0.14);
}

.company-editorial-readout-header {
  margin-bottom: var(--space-6);
}

.company-editorial-readout-kicker {
  margin: 0 0 var(--space-2);

  color: var(--red);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.company-editorial-readout-header h2 {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
}

.company-editorial-readout-body {
  display: grid;
  grid-template-columns:
    minmax(0, 0.95fr)
    minmax(0, 1.25fr);
  gap: clamp(1.75rem, 5vw, 2.75rem);
  align-items: start;
}

.company-editorial-readout-thesis {
  margin: 0;

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 590;
  letter-spacing: -0.025em;
  line-height: 1.34;
  text-wrap: balance;
}

.company-editorial-readout-points {
  display: grid;
  gap: var(--space-3);
}

.company-editorial-readout-points p {
  margin: 0;

  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.58;
}

.company-editorial-readout-points strong {
  color: var(--text-strong);
  font-weight: var(--font-weight-bold);
}

.company-editorial-readout .company-editorial-readout-dive {
  grid-column: 1 / -1;

  margin: var(--space-6) 0 0;

  color: var(--red);
  font-size: 1.08rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.01em;
  line-height: 1.35;
}


/* ============================================================
   LONG-FORM PROFILE BODY
   ============================================================ */

.company-section {
  scroll-margin-top: var(--space-8);
}

.company-section h2 {
  margin: 0 0 var(--space-4);

  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.7rem);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
  line-height: 1.14;
}

.company-section h3 {
  margin: var(--space-8) 0 var(--space-2);

  color: var(--blue);
  font-size: 1.05rem;
  font-weight: var(--font-weight-semibold);
  line-height: 1.35;
}

.company-section p {
  margin: 0 0 var(--space-4);

  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.72;
}

.company-section p:last-child {
  margin-bottom: 0;
}

.company-section a,
.company-back a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.company-section a:hover,
.company-section a:focus-visible,
.company-back a:hover,
.company-back a:focus-visible {
  color: var(--red);
}

.page-company-profile .soft-break {
  width: 100%;
  height: 1px;

  margin: clamp(2.35rem, 6vw, 3.25rem) 0;

  background: var(--divider);
}

.company-list {
  margin: 0;
  padding: 0;

  list-style: none;
}

.company-list li {
  position: relative;

  margin-bottom: 0.5rem;
  padding-left: 1rem;

  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.58;
}

.company-list li:last-child {
  margin-bottom: 0;
}

.company-list li::before {
  position: absolute;
  top: 0;
  left: 0;

  color: var(--text-soft);
  content: "•";
  font-weight: var(--font-weight-semibold);
}

.company-product-links {
  margin: var(--space-3) 0 var(--space-5);
}

.company-product-links a,
.company-update-links a {
  color: var(--blue);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.company-product-links a:hover,
.company-product-links a:focus-visible,
.company-update-links a:hover,
.company-update-links a:focus-visible {
  color: var(--red);
  text-decoration: underline;
}

.company-product-links span,
.company-update-links span {
  color: var(--text);
}

.company-update-links li {
  margin-bottom: var(--space-4);
}


/* ============================================================
   HIGHLIGHTS
   ============================================================ */

.company-highlights h2,
.company-highlights-title {
  margin: 0 0 var(--space-4);

  color: var(--red);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
}

.company-highlights-list {
  margin: 0;
  padding: 0;

  list-style: none;
}

.company-highlights-list li {
  position: relative;

  margin-bottom: 0.65rem;
  padding-left: 1rem;

  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.58;
}

.company-highlights-list li::before {
  position: absolute;
  top: 0;
  left: 0;

  color: var(--red);
  content: "•";
  font-weight: var(--font-weight-bold);
}


/* ============================================================
   PROFILE NOTES
   ============================================================ */

.company-profile-context {
  margin: clamp(2.75rem, 7vw, 4rem) 0 0;

  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.62;
}

.company-profile-context a {
  color: var(--blue);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.company-profile-context a:hover,
.company-profile-context a:focus-visible {
  color: var(--red);
  text-decoration: underline;
}

.company-source-note {
  max-width: 44rem;
  margin: var(--space-4) 0 0;

  color: var(--text-faint);
  font-size: 0.84rem;
  line-height: 1.62;
}

.company-last-updated {
  margin-top: var(--space-4);
}

.company-last-updated p {
  margin: 0;

  color: var(--text-faint);
  font-size: 0.82rem;
  line-height: 1.5;
}


/* ============================================================
   BOTTOM PROFILE NAVIGATION
   ============================================================ */

.company-profile-nav-bottom-compact {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.75rem;

  margin: var(--space-8) 0 2.25rem;
}

.company-bottom-arrow {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;

  color: var(--text-soft);
  line-height: 1;
  text-decoration: none;
}

.company-bottom-arrow:hover,
.company-bottom-arrow:focus-visible {
  color: var(--red);
  text-decoration: none;
}

.company-bottom-arrow:focus-visible {
  border-radius: var(--radius-sm);
  outline: 2px solid var(--blue-focus);
  outline-offset: 5px;
}

.company-bottom-arrow-symbol {
  font-size: 1.25rem;
  font-weight: var(--font-weight-medium);
  line-height: 1;
}

.company-bottom-arrow-label {
  color: currentColor;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;

  opacity: 0;
  transform: translateY(-0.15rem);

  transition:
    opacity var(--duration-standard) var(--ease-standard),
    transform var(--duration-standard) var(--ease-out);
}

.company-bottom-arrow:hover .company-bottom-arrow-label,
.company-bottom-arrow:focus-visible .company-bottom-arrow-label {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   PROFILE END ROW
   ============================================================ */

.company-favicon-back-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-6);

  margin: clamp(3rem, 8vw, 4.5rem) 0 0;
}

.company-back a {
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 760px) {
  .page-company-profile .company-profile {
    padding-block:
      clamp(2.25rem, 8vw, 3.25rem)
      4rem;
  }

  .company-header {
    margin-bottom: 3rem;
    padding: 1.5rem;
    border-radius: 22px;
  }

  .company-title {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .company-summary {
    margin-top: var(--space-5);
    font-size: 0.98rem;
  }

  .profile-label-full {
    display: none;
  }

  .profile-label-short {
    display: inline;
  }

  .company-snapshot-frame figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-2);
  }

  .company-snapshot-primary img {
    max-height: 420px;
  }

  .company-snapshot-secondary-grid {
    grid-template-columns: 1fr;
  }

  .company-snapshot-secondary .company-snapshot-zoom {
    height: 210px;
  }

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

  .company-editorial-readout-body {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .company-editorial-readout-thesis {
    max-width: 25ch;
  }
}

@media (max-width: 520px) {
  .company-profile-nav {
    gap: var(--space-3);
    margin-bottom: var(--space-5);
  }

  .company-profile-nav-link {
    gap: 0.35rem;
    font-size: 0.86rem;
  }

  .company-header {
    padding: 1.3rem;
  }

  .company-header-row {
    gap: var(--space-4);
  }

  .company-header-mark {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
  }

  .company-header-mark img {
    width: 1.5rem;
    height: 1.5rem;
  }

  .company-share-row {
    gap: 0.5rem;
  }

  .company-website-snapshot {
    margin-block: 2.75rem;
    padding: 1.1rem;
  }

  .company-details-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .company-detail-reference-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-editorial-readout {
    padding-block: 1.65rem;
  }

  .company-section p {
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .company-list li,
  .company-highlights-list li {
    font-size: 0.93rem;
  }

  .company-favicon-back-row {
    gap: var(--space-4);
  }


}

