/* Category front pages. Continuation pages use the shared discovery layout. */
.ndc-edition {
  --edition-stock: #f6e9e7;
  --edition-rule: var(--listing-line);
  --edition-space: clamp(1.65rem, 3.5vw, 3.6rem);
}
.ndc-edition--shape { --edition-stock: #f0ebf4; --edition-rule: #c7bbce; }
.ndc-edition--care { --edition-stock: #faf1d9; --edition-rule: #cfc2a6; }
.ndc-edition--howto { --edition-stock: #fae9da; --edition-rule: #d8bdaa; }
.ndc-edition--topic { --edition-stock: #f6ebe8; }
.ndc-edition[data-topic="acrylic-nail"] { --edition-stock: #f0e8f2; --edition-rule: #cdbdd0; }
.ndc-edition[data-topic="gel"] { --edition-stock: #fae7ec; --edition-rule: #d6bfc7; }
.ndc-edition[data-topic="shellac"] { --edition-stock: #f5e3df; --edition-rule: #d4bbb5; }
.ndc-edition:is([data-topic="nail-length"], [data-topic="short"], [data-topic="long"]) {
  --edition-stock: #f6eddf;
  --edition-rule: #d2c3ae;
}
.ndc-edition--shade {
  --edition-stock: #f5ecee;
  --edition-stock: color-mix(in srgb, var(--ndc-shade, #b86687) 13%, #fffaf8);
}
.ndc-edition .ndc-edition__hero {
  padding-block: clamp(1.1rem, 2.5vw, 2.4rem);
  border-block-end: 1px solid var(--edition-rule);
  background: var(--edition-stock);
}
.ndc-edition .ndc-edition__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .26rem 1rem;
  margin-top: .25rem;
}
.ndc-edition .ndc-edition__title h1 {
  margin: 0;
  color: var(--listing-ink);
  font: 400 clamp(2.4rem, 4.1vw, 3.9rem)/1.01 var(--listing-serif);
  letter-spacing: -.048em;
  overflow-wrap: anywhere;
}
.ndc-edition .ndc-edition__intro,
.ndc-edition .ndc-discovery-intro {
  max-width: 60ch;
  margin-block: .75rem 0;
  line-height: 1.55;
}
.ndc-edition .ndc-edition__topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-block-start: 1.15rem;
}
.ndc-edition .ndc-edition__topic {
  display: inline-flex;
  align-items: center;
  gap: .43rem;
  min-height: 2.75rem;
  max-width: 100%;
  padding: .35rem .83rem;
  border: 1px solid var(--edition-rule);
  border-radius: 2rem;
  color: var(--listing-ink);
  background: var(--studio-paper, #fffaf8);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.ndc-edition .ndc-edition__topic[aria-current="page"] {
  border-color: var(--listing-ink);
  box-shadow: inset 0 0 0 1px var(--listing-ink);
}
.ndc-edition .ndc-edition__sample {
  display: inline-block;
  flex: none;
  width: 1.08rem;
  height: 1.08rem;
  background: var(--ndc-shade, #c38c95);
  border: 1px solid rgb(48 35 43 / 32%);
  border-radius: 50%;
}
/* These are filled nail profiles seen from above, with the free edge at the top. */
.ndc-edition .ndc-edition__outline {
  display: inline-block;
  flex: none;
  width: 1.06rem;
  height: 1.55rem;
  background: var(--listing-berry);
  border-radius: 44% 44% 39% 39% / 55% 55% 22% 22%;
}
.ndc-edition .ndc-edition__outline[data-shape="almond"] {
  width: 1rem;
  height: 1.6rem;
  border-radius: 55% 55% 42% 42% / 85% 85% 24% 24%;
}
.ndc-edition .ndc-edition__outline[data-shape="coffin"] {
  clip-path: polygon(26% 0, 74% 0, 99% 61%, 95% 89%, 81% 98%, 49% 100%, 19% 98%, 5% 89%, 1% 61%);
  border-radius: 0;
}
.ndc-edition .ndc-edition__outline[data-shape="square"] { border-radius: 1px 1px 37% 37% / 1px 1px 20% 20%; }
.ndc-edition .ndc-edition__outline[data-shape="round"] { height: 1.18rem; border-radius: 50% 50% 40% 40% / 48% 48% 25% 25%; }
.ndc-edition .ndc-edition__outline[data-shape="oval"] { border-radius: 50% 50% 42% 42% / 55% 55% 25% 25%; }

.ndc-edition > .ndc-edition__inner { padding-block-end: clamp(2.7rem, 6vw, 6rem); }
.ndc-edition .ndc-edition__desk,
.ndc-edition .ndc-edition__index { padding-block-start: var(--edition-space); }
.ndc-edition .ndc-edition__desk h2,
.ndc-edition .ndc-edition__index > h2 {
  margin: 0 0 .85rem;
  color: var(--listing-ink);
  font: 400 clamp(1.55rem, 2.6vw, 2.55rem)/1.1 var(--listing-serif);
  letter-spacing: -.035em;
  text-wrap: pretty;
}
.ndc-edition .ndc-edition__choices {
  display: grid;
  align-items: start;
  border-block-end: 1px solid var(--edition-rule);
}
.ndc-edition .ndc-edition__choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-block-start: 1px solid var(--edition-rule);
}
.ndc-edition .ndc-edition__choice summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-height: 3.15rem;
  padding: .58rem .12rem;
  color: var(--listing-ink);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.ndc-edition .ndc-edition__choice summary::-webkit-details-marker { display: none; }
.ndc-edition .ndc-edition__choice summary::after {
  content: "";
  flex: none;
  width: .53rem;
  height: .53rem;
  margin-inline: .3rem;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.13rem) rotate(45deg);
}
.ndc-edition .ndc-edition__choice[open] summary::after { transform: translateY(.13rem) rotate(225deg); }
.ndc-edition .ndc-edition__choice p {
  max-width: 55ch;
  margin: 0;
  color: var(--listing-muted);
  font-size: .95rem;
  line-height: 1.5;
}
.ndc-edition .ndc-edition__choice a {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  margin-block: .1rem .45rem;
  color: var(--listing-berry);
  text-underline-offset: .2em;
  font-size: .94rem;
  font-weight: 600;
}

.ndc-edition .ndc-edition__stories {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.1rem, 2.5vw, 2.4rem) clamp(1.1rem, 3vw, 3.25rem);
}
.ndc-edition .ndc-edition__stories > :not(.ndc-discovery-card) {
  grid-column: 1 / -1;
  min-width: 0;
}
.ndc-edition .ndc-edition__stories .ndc-discovery-card:not(:first-child) {
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--edition-rule);
}
.ndc-edition .ndc-edition__stories .ndc-card-with-image:not(:first-child) {
  display: grid;
  grid-template-columns: clamp(5rem, 25vw, 10rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(.75rem, 1.65vw, 1.5rem);
}
.ndc-edition .ndc-edition__stories .ndc-discovery-card:not(:first-child) .ndc-card-image img { aspect-ratio: 1; }
.ndc-edition .ndc-edition__stories .ndc-card-copy { padding: 0; border: 0; }
.ndc-edition .ndc-edition__stories .ndc-card-copy h2 { font-size: clamp(1.24rem, 2vw, 1.95rem); }
.ndc-edition .ndc-edition__stories .ndc-discovery-lead {
  padding: 0;
  border: 0;
  background: var(--edition-stock);
}
.ndc-edition .ndc-edition__stories .ndc-discovery-lead .ndc-card-copy {
  padding: clamp(1.15rem, 3vw, 3rem);
}
.ndc-edition .ndc-edition__stories .ndc-discovery-lead .ndc-card-copy h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}
.ndc-edition .ndc-edition__stories .ndc-discovery-lead .ndc-card-image img { aspect-ratio: 1.55; }
.ndc-edition .ndc-discovery-kicker { margin-block-end: .35rem; font-size: .72rem; }

@media (min-width: 42rem) {
  .ndc-edition .ndc-edition__choices {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
    gap: 0 1.5rem;
    border-block-end: none;
  }
  .ndc-edition .ndc-edition__stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ndc-edition .ndc-edition__stories .ndc-card-with-image:not(:first-child) {
    grid-template-columns: clamp(4.75rem, 10vw, 9rem) minmax(0, 1fr);
  }
  .ndc-edition .ndc-edition__stories .ndc-discovery-lead.ndc-card-with-image {
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
  }
  /* A pair of photo-led stories breaks up the short, two-up archive rows. */
  .ndc-edition:is(.ndc-edition--designs, .ndc-edition--shade, .ndc-edition--topic)
    .ndc-edition__stories .ndc-card-with-image:is(:nth-child(6n+2 of article), :nth-child(6n+3 of article)) {
    display: block;
    border: none;
    padding: 0;
  }
  .ndc-edition:is(.ndc-edition--designs, .ndc-edition--shade, .ndc-edition--topic)
    .ndc-edition__stories .ndc-card-with-image:is(:nth-child(6n+2 of article), :nth-child(6n+3 of article)) .ndc-card-image img {
    aspect-ratio: 1.75;
  }
  .ndc-edition:is(.ndc-edition--designs, .ndc-edition--shade, .ndc-edition--topic)
    .ndc-edition__stories .ndc-card-with-image:is(:nth-child(6n+2 of article), :nth-child(6n+3 of article)) .ndc-card-copy {
    padding-block-start: .7rem;
  }
  .ndc-edition--shape .ndc-edition__topic:has(.ndc-edition__outline) {
    flex-direction: column;
    justify-content: end;
    min-width: 4.6rem;
    min-height: 5.1rem;
    padding: .55rem .6rem;
    border-radius: .25rem;
    row-gap: .55rem;
  }
}
@media (min-width: 65rem) {
  .ndc-edition .ndc-edition__hero > .ndc-edition__inner:has(> .ndc-edition__topics) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 0 clamp(2.25rem, 5vw, 6rem);
    align-content: start;
  }
  .ndc-edition .ndc-edition__hero > .ndc-edition__inner > :not(.ndc-edition__topics) { grid-column: 1; }
  .ndc-edition .ndc-edition__topics {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    margin-block-start: 0;
  }
  .ndc-edition:is(.ndc-edition--care, .ndc-edition--howto) .ndc-edition__desk {
    display: grid;
    grid-template-columns: minmax(12rem, .65fr) minmax(0, 2fr);
    column-gap: 3rem;
  }
  .ndc-edition:is(.ndc-edition--care, .ndc-edition--howto) .ndc-edition__choices {
    display: block;
    border-block-end: 1px solid var(--edition-rule);
  }
}
@media (hover: hover) {
  .ndc-edition .ndc-edition__topic:hover { border-color: var(--listing-berry); color: var(--listing-berry); }
  .ndc-edition .ndc-edition__choice summary:hover { color: var(--listing-berry); text-decoration: underline; text-underline-offset: .23em; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ndc-edition .ndc-edition__outline { transition: transform 160ms ease; }
  .ndc-edition .ndc-edition__topic:hover .ndc-edition__outline { transform: translateY(-2px); }
}

.ndc-edition .ndc-edition-jump {
  display: inline-flex; align-items: center; gap: .25em; width: fit-content; min-height: 2.75rem;
  color: var(--studio-berry, #743452); font: 650 .86rem/1.15 var(--sans, sans-serif);
  text-decoration: underline; text-underline-offset: .22em;
}
.ndc-edition .ndc-edition-jump:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
