/* Moduj: small interface refinements over the existing industrial theme. */

:is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #6bd5df;
  outline-offset: 3px;
}

.page-intro p,
.doc-hero p,
.portal-page-intro p {
  color: #b0c1ca;
  line-height: 1.85;
}

.section-head {
  align-items: flex-start;
  gap: 18px;
}

.section-head h2 {
  line-height: 1.3;
}

.section-head p {
  color: #a8bdc9;
  line-height: 1.8;
}

.text-link:hover,
footer a:hover {
  color: #ffd18b;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 761px) {
  .sidebar .nav-link {
    min-height: 37px;
    gap: 11px;
    margin-bottom: 4px;
    padding: 8px 11px;
    line-height: 1.45;
  }

  .sidebar .nav-link svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
  }

  .sidebar .brand-tag {
    margin-bottom: 22px;
  }

  .sidebar .nav-caption {
    margin-bottom: 10px;
  }
}

/* Four clear destinations; each entire panel is a link. */
.home-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
}

a.home-entry-card {
  --entry-accent: #f2b85b;
  --entry-tint: #342d21;
  --entry-edge: #75603d;
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 18px;
  min-width: 0;
  min-height: 150px;
  padding: 24px;
  border: 1px solid #40535e;
  border-top-color: #596b75;
  border-radius: 3px;
  color: #edf1f0;
  text-decoration: none;
  background: linear-gradient(125deg, #22313a, #172128 78%);
  box-shadow: inset 1px 1px 0 #b4d1df12, inset -1px -1px 0 #050b0e70, 0 3px 0 #080e12;
}

a.home-entry-card:nth-child(2),
a.home-entry-card:nth-child(3) {
  --entry-accent: #6bd5df;
  --entry-tint: #16313b;
  --entry-edge: #4d7581;
}

a.home-entry-card::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px -1px;
  width: 3px;
  background: var(--entry-accent);
}

a.home-entry-card:hover,
a.home-entry-card:focus-visible {
  border-color: var(--entry-accent);
  background: linear-gradient(125deg, #2b3c47, #1b2932 78%);
}

a.home-entry-card:focus-visible {
  outline-width: 3px;
  outline-offset: 4px;
}

.home-entry-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  min-width: 0;
  border: 1px solid var(--entry-edge);
  border-radius: 3px;
  color: var(--entry-accent);
  background: var(--entry-tint);
  box-shadow: inset 1px 1px 0 #d6ecf014, 0 2px 0 #0a1117;
}

.home-entry-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.7;
}

.home-entry-copy {
  min-width: 0;
  overflow-wrap: break-word;
}

.home-entry-copy small {
  display: block;
  margin-bottom: 8px;
  color: var(--entry-accent);
  font-family: var(--label-font, ui-monospace, monospace);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.home-entry-copy h3 {
  margin: 0;
  color: #edf3f2;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.4px;
}

.home-entry-copy p {
  margin: 9px 0 0;
  color: #adbfca;
  font-size: 12px;
  line-height: 1.8;
}

.home-entry-arrow {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #8ca8b8;
}

.home-entry-arrow svg {
  width: 19px;
  height: 19px;
}

a.home-entry-card:hover .home-entry-arrow,
a.home-entry-card:focus-visible .home-entry-arrow {
  color: var(--entry-accent);
}

/* Compatible with either <dl class="home-pack-facts"> or a section around dl. */
.home-pack-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  margin: 18px 0 28px;
  padding: 0;
  border: 1px solid #3e515d;
  border-radius: 3px;
  color: #e4edf1;
  background: #131f27;
  box-shadow: inset 0 1px 0 #a7cad418, 0 2px 0 #080e12;
}

.home-pack-facts > dl {
  display: contents;
}

.home-pack-facts > div,
.home-pack-facts > dl > div {
  min-width: 0;
  margin: 0;
  padding: 17px 19px;
  border-right: 1px solid #334752;
}

.home-pack-facts > div:last-child,
.home-pack-facts > dl > div:last-child {
  border-right: 0;
}

.home-pack-facts dt {
  margin: 0 0 7px;
  color: #9eb9c7;
  font-family: var(--label-font, ui-monospace, monospace);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .8px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.home-pack-facts dd {
  margin: 0;
  color: #edf2ee;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.portal-download-card > .portal-build-details {
  justify-content: flex-start;
}

/* Keep each readiness statement readable, including pending/unverified states. */
.launcher-readiness-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.launcher-readiness-list > li {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 1.6fr);
  gap: 18px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #3f5663;
  border-left: 3px solid #d4a45b;
  border-radius: 2px;
  background: #14242e;
}

.launcher-readiness-list strong {
  color: #ecd5af;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.launcher-readiness-list span {
  min-width: 0;
  color: #bbced9;
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
  a.home-entry-card {
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    gap: 14px;
    padding: 20px;
  }

  .home-entry-icon {
    width: 44px;
    height: 44px;
  }

  .home-entry-copy h3 {
    font-size: 18px;
  }

  .home-pack-facts > div,
  .home-pack-facts > dl > div {
    padding: 16px 14px;
  }
}

@media (max-width: 760px) {
  .sidebar .nav-link {
    min-height: 42px;
    font-size: 9px;
    line-height: 1.35;
  }

  .sidebar .nav-link svg {
    width: 16px;
    height: 16px;
  }

  .page-intro p,
  .doc-hero p,
  .portal-page-intro p {
    font-size: 12px;
  }
}

@media (max-width: 650px) {
  .home-entry-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }

  a.home-entry-card {
    min-height: 132px;
  }

  .home-entry-copy p {
    font-size: 12px;
    line-height: 1.75;
  }

  .home-pack-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0 24px;
  }

  .home-pack-facts > div,
  .home-pack-facts > dl > div {
    padding: 15px 16px;
  }

  .home-pack-facts > div:nth-child(2n),
  .home-pack-facts > dl > div:nth-child(2n) {
    border-right: 0;
  }

  .home-pack-facts > div:nth-child(n + 3),
  .home-pack-facts > dl > div:nth-child(n + 3) {
    border-top: 1px solid #334752;
  }

  .launcher-readiness-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 15px 16px;
  }
}

@media (max-width: 380px) {
  a.home-entry-card {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 18px 16px;
  }

  .home-entry-icon {
    width: 40px;
    height: 40px;
  }

  .home-entry-icon svg {
    width: 23px;
    height: 23px;
  }

  .home-entry-copy small {
    font-size: 8px;
    letter-spacing: .8px;
  }
}
