/* Inner pages: keep content column readable */
.md-main__inner.md-grid {
  max-width: 56rem;
}

.md-content .md-content__inner {
  margin-top: 1.2rem;
}

/* Content tabs: keep labels horizontal and show one panel at a time */
.md-typeset .tabbed-set {
  display: flex;
  flex-flow: column wrap;
  margin: 1em 0;
  position: relative;
}

.md-typeset .tabbed-set > input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.md-typeset .tabbed-set > .tabbed-labels {
  display: flex;
  overflow: auto;
  max-width: 100%;
  box-shadow: 0 -0.05rem var(--md-default-fg-color--lightest) inset;
}

.md-typeset .tabbed-set > .tabbed-labels > label {
  flex-shrink: 0;
  padding: 0.78em 1.25em 0.62em;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--md-default-fg-color--light);
  border-bottom: 0.1rem solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.md-typeset .tabbed-set > .tabbed-labels > label:hover {
  color: var(--md-default-fg-color);
}

.md-typeset .tabbed-set > .tabbed-content {
  width: 100%;
}

.md-typeset .tabbed-set > .tabbed-content > .tabbed-block {
  display: none;
}

.md-typeset .tabbed-set > input:first-child:checked ~ .tabbed-content > .tabbed-block:nth-child(1),
.md-typeset .tabbed-set > input:nth-child(2):checked ~ .tabbed-content > .tabbed-block:nth-child(2),
.md-typeset .tabbed-set > input:nth-child(3):checked ~ .tabbed-content > .tabbed-block:nth-child(3) {
  display: block;
}

.md-typeset .tabbed-set > input:first-child:checked ~ .tabbed-labels > :nth-child(1),
.md-typeset .tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > :nth-child(2),
.md-typeset .tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > :nth-child(3) {
  color: var(--md-accent-fg-color);
  border-bottom-color: var(--md-accent-fg-color);
}

/* Site-wide: hide chrome (sidebar nav already hidden via front matter) */
.md-header,
.md-footer {
  display: none;
}

:root {
  --md-header-height: 0rem;
}

/* Hide markdown H1 in content (pages use ## as top heading; index uses custom landing title) */
.md-content .md-typeset > h1:first-child,
.md-content .md-typeset > .doc-title {
  display: none;
}

.landing,
.product-strip {
  margin-left: auto;
  margin-right: auto;
}

.landing {
  max-width: 46rem;
  margin-top: 3rem;
  margin-bottom: 0;
  padding: 0 1.25rem 3rem;
  text-align: center;
  border-bottom: 1px solid color-mix(in srgb, var(--md-default-fg-color--lightest) 72%, transparent);
}

.product-strip {
  max-width: 42rem;
  padding-top: 3.25rem;
}

.landing-title,
.doc-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.landing-title {
  justify-content: center;
  margin: 0 0 0.5rem;
}

.landing-identity {
  margin-bottom: 1.15rem;
}

.landing-identity .landing-title {
  margin-bottom: 0.45rem;
}

.doc-title {
  justify-content: space-between;
  width: 100%;
  margin: 0 0 1em;
}

.landing-title h1,
.doc-title h1 {
  margin: 0;
}

.landing-title h1 {
  font-size: clamp(2.35rem, 6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  background: linear-gradient(
    128deg,
    var(--md-primary-fg-color) 0%,
    var(--md-accent-fg-color) 48%,
    #9b4dc8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.github-link {
  position: relative;
  top: 3px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--md-default-fg-color--light);
  transition: color 0.15s ease, top 0.15s ease;
}

.github-link__label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.github-link:hover {
  color: var(--md-default-fg-color);
  top: 2px;
}

.landing-meta .github-link {
  top: 0;
}

.landing-meta .github-link:hover {
  top: -1px;
}

.landing-taglines {
  margin: 0 auto;
  max-width: 28rem;
}

.landing-tagline {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.5;
  letter-spacing: 0.015em;
  font-weight: 400;
  color: var(--md-default-fg-color--light);
}

.landing-subtagline {
  margin: 0.35rem 0 0;
  font-size: clamp(0.875rem, 1.9vw, 0.975rem);
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-weight: 400;
  color: var(--md-default-fg-color--lighter);
}

.landing-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color--light);
}

.landing-meta-license {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease;
}

.landing-meta-license:hover {
  color: var(--md-default-fg-color);
}

.product-strip {
  --strip-gap: 0.78rem;
  --card-width-ratio: 0.9;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  row-gap: calc(var(--strip-gap) * 2);
  column-gap: var(--strip-gap);
}

.product-card {
  width: calc(100% * var(--card-width-ratio));
  justify-self: start;
  display: flex;
  flex-direction: column;
  min-height: 130px;
  text-decoration: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--md-default-fg-color--lightest) 78%, transparent);
  border-radius: 0.5rem;
  background: var(--md-default-bg-color);
  padding: 0.92rem 0.95rem 0.98rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card h3 {
  margin: 0 0 0.48rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.product-card p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
}

.card-profile {
  border-top: 2px solid #b63ac9;
}

.card-install {
  border-top: 2px solid #2d9d78;
}

.card-tools {
  border-top: 2px solid #5f70d9;
}

.card-core {
  border-top: 2px solid #cc7a2a;
}

.product-card:nth-child(even) {
  justify-self: end;
}

.product-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

@media (max-width: 1100px) {
  .landing {
    max-width: 100%;
  }

  .product-strip {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .landing {
    margin-top: 2.4rem;
    padding-bottom: 2.75rem;
  }

  .product-strip {
    padding-top: 2.5rem;
    grid-template-columns: 1fr;
  }

  .product-card,
  .product-card:nth-child(even) {
    width: 100%;
    justify-self: stretch;
  }
}
