/* Shared editorial styling for the product directory and detail pages. */
:root {
  --overview-accent: #a8e7c8;
  --overview-title: #f6fafc;
  --overview-body: #cbd8e4;
  --overview-line: #385467;
  --overview-panel: #182b3c;
  --overview-heading-font: Georgia, "Songti SC", "Noto Serif CJK SC", SimSun, serif;
}

#main.product-editorial .page-hero h1,
#main.site-editorial .home-hero h1,
#main.site-editorial .page-hero h1 {
  color: var(--overview-title);
  font-family: var(--overview-heading-font);
  font-size: clamp(2.2rem, 4.5vw, 4.25rem);
  line-height: 1.12;
  text-wrap: balance;
}

#main.product-editorial .page-hero .project-name,
#main.site-editorial .catalog-group h2,
#main.site-editorial .home-products h2 {
  color: var(--overview-accent);
}

#main.product-editorial .page-hero p {
  color: var(--overview-body);
  line-height: 1.75;
}

.product-overview-section {
  padding-block: clamp(2.25rem, 5vw, 4.5rem);
}

.product-overview {
  color: var(--overview-body);
}

.product-overview-heading {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr);
  gap: 1.25rem 3rem;
  align-items: start;
  margin-block-end: 1.6rem;
}

.product-overview-heading h2 {
  margin: 0;
  padding-inline-start: .9rem;
  border-inline-start: 3px solid var(--overview-accent);
  color: var(--overview-title);
  font-family: var(--overview-heading-font);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.22;
  text-wrap: balance;
}

.product-overview p {
  margin: 0;
  color: var(--overview-body);
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.product-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}

.product-overview-card,
.product-overview-example {
  min-width: 0;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  border: 1px solid var(--overview-line);
  border-radius: .75rem;
  background: var(--overview-panel);
}

.product-overview h3 {
  margin: 0 0 .55rem;
  color: var(--overview-accent);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.product-overview-example {
  display: grid;
  grid-template-columns: minmax(7rem, .28fr) minmax(0, 1fr);
  gap: .5rem 1.5rem;
  align-items: baseline;
  margin-block-start: .85rem;
  border-inline-start: 3px solid var(--overview-accent);
  background: #152535;
}

.product-overview-example h3 {
  margin: 0;
}

.product-overview + .catalog-image {
  margin-block-start: 1.5rem;
}

#main.site-editorial .catalog-group h2,
#main.site-editorial .page-projects h2,
#main.site-editorial .home-products h2 {
  font-family: var(--overview-heading-font);
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.18;
  text-wrap: balance;
}

#main.site-editorial :is(.home-product-entry, .home-service-entry, .catalog-item) h3 {
  line-height: 1.3;
  text-wrap: pretty;
}

#main.site-editorial .home-product-entry:focus-visible,
#main.site-editorial .home-service-entry:focus-visible,
#main.site-editorial .catalog-item a:focus-visible {
  outline: 2px solid var(--overview-accent);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .product-overview-heading,
  .product-overview-grid,
  .product-overview-example {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-overview-heading {
    gap: .85rem;
  }
}
