/* Shared collection card and ending presentation. */
.tws-hub-surface {
  --hub-accent: #c6e7b0;
  --hub-ink: #f5f1e5;
  --hub-muted: #bdcdc3;
  --hub-card: #172722;
  --hub-line: #3d5850;
  --hub-dark: #091713;
}
.tws-hub-surface[data-tws-hub-tone="tools"] {
  --hub-accent: #c1eee4;
  --hub-muted: #b8cdce;
  --hub-card: #16272b;
  --hub-line: #39575b;
  --hub-dark: #0b181d;
}
.tws-hub-surface[data-tws-hub-tone="kitchen"] {
  --hub-accent: #efd0b7;
  --hub-muted: #d5c4bd;
  --hub-card: #2a2227;
  --hub-line: #5d4852;
  --hub-dark: #21191d;
}
.tws-hub-surface .rc-main {
  --hub-accent: var(--rc-accent);
  --hub-card: var(--rc-panel);
  --hub-line: var(--rc-line);
  --hub-dark: var(--rc-bg);
}
.tws-hub-surface[data-tws-hub-tone="archive"] {
  --hub-accent: #e3d9a4;
  --hub-card: #242923;
  --hub-line: #505648;
  --hub-dark: #161d17;
}
.tws-hub-surface .tws-hub-card-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-width: 0;
  align-items: stretch;
}
.tws-hub-surface.rh-filtered .tws-hub-collections {
  display: none !important;
}
.tws-hub-surface .tws-hub-card,
.tws-hub-surface.rh-main .tws-hub-card,
.tws-hub-surface .tws-hub-card.tws-calculators-short-listing {
  display: grid !important;
  grid-template-columns: clamp(50px, 8vw, 84px) minmax(0, 1fr) 16px !important;
  grid-template-rows: auto !important;
  grid-template-areas: none !important;
  align-items: center !important;
  gap: clamp(8px, 1.4vw, 14px) !important;
  box-sizing: border-box;
  position: relative;
  width: auto !important;
  min-width: 0;
  max-width: none !important;
  min-height: 62px !important;
  height: auto !important;
  padding: 7px 10px 7px 7px !important;
  margin: 0 !important;
  color: var(--hub-ink) !important;
  border: 1px solid var(--hub-line) !important;
  border-radius: 10px !important;
  background: var(--hub-card) !important;
  box-shadow: none !important;
  text-align: left !important;
  text-decoration: none !important;
  letter-spacing: normal;
  white-space: normal;
  overflow: hidden;
}
.tws-hub-surface .tws-hub-card-grid > [hidden],
.tws-hub-surface .tws-hub-card-grid > .tws-hub-card[hidden] {
  display: none !important;
}
/* Override the original tall feature-tile dimensions only after those tiles
   have been converted to browse rows on the growing collection. */
.tws-hub-surface #grow-field-guides .tws-curated-grid > .tws-curated-card.tws-hub-card {
  height: auto !important;
  min-height: 0 !important;
}
.tws-hub-surface #grow-field-guides .tws-hub-card .tws-curated-description {
  -webkit-line-clamp: 2;
}
.tws-hub-surface .tws-hub-card::before,
.tws-hub-surface .tws-hub-card::after,
.tws-hub-surface .tws-hub-card-copy :is(.tws-curated-more, .rh-action, .recipe-archive-arrow, .tool-arrow, .tool-card-symbol),
.tws-hub-surface .tws-hub-card.tws-curated-topic-card .tws-hub-card-copy em,
.tws-hub-surface .tws-hub-card.instrument .tws-hub-card-copy em {
  display: none !important;
}
.tws-hub-surface .tws-hub-card :is(.tws-hub-card-art, .tws-hub-card-copy, .tws-hub-card-arrow) {
  position: static !important;
  grid-area: auto !important;
}
.tws-hub-surface .tws-hub-card .tws-hub-card-art {
  display: grid !important;
  place-items: center;
  box-sizing: border-box;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  border: 0 !important;
  border-radius: 6px !important;
  object-fit: cover;
  filter: none !important;
  color: var(--hub-accent);
}
.tws-hub-surface .tws-hub-card .tws-hub-card-art:not(img) {
  background: color-mix(in srgb, var(--hub-accent) 13%, var(--hub-dark)) !important;
}
.tws-hub-surface .tws-hub-card .tws-hub-card-art svg {
  width: min(55%, 28px) !important;
  height: auto !important;
  max-height: 30px;
}
.tws-hub-surface .tws-hub-card > .tws-hub-card-copy {
  display: block !important;
  min-width: 0;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hub-ink);
  font: 650 .91rem/1.3 system-ui, sans-serif;
  overflow-wrap: anywhere;
  align-self: center;
}
.tws-hub-surface .tws-hub-card .tws-hub-card-copy > div,
.tws-hub-surface .tws-hub-card .tws-hub-card-copy .tws-curated-copy {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}
.tws-hub-surface .tws-hub-card .tws-hub-card-copy :is(h2, h3, strong) {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hub-ink) !important;
  font: 720 .91rem/1.3 system-ui, sans-serif !important;
  border: 0 !important;
  letter-spacing: normal !important;
}
.tws-hub-surface .tws-hub-card .tws-hub-card-copy :is(p, .tws-curated-description, .tws-hub-topic-detail),
.tws-hub-surface .tws-hub-card.tws-curated-topic-card .tws-hub-card-copy > span {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  color: var(--hub-muted) !important;
  font: .78rem/1.35 system-ui, sans-serif !important;
  overflow: hidden;
}
.tws-hub-surface .tws-hub-card.tool-card .tws-hub-card-copy p {
  -webkit-line-clamp: 2;
}
.tws-hub-surface .tws-hub-card .tws-hub-card-copy :is(.tool-icon, .tws-curated-tag, .rh-label, .recipe-archive-meta, small) {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 0 3px !important;
  padding: 0 !important;
  color: var(--hub-accent) !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  font: 700 .63rem/1.25 system-ui, sans-serif !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tws-hub-surface .tws-hub-card > .tws-hub-card-arrow {
  color: var(--hub-accent);
  font: 700 .88rem/1 system-ui, sans-serif;
  justify-self: end;
}
.tws-hub-surface .tws-hub-card:hover,
.tws-hub-surface .tws-hub-card.tws-calculators-short-listing:hover {
  border-color: var(--hub-accent) !important;
  background: color-mix(in srgb, var(--hub-accent) 7%, var(--hub-card)) !important;
}
.tws-hub-surface :is(.tws-hub-card, .tws-hub-spotlight, .tws-hub-endcap-more a):focus-visible {
  outline: 2px solid var(--hub-accent) !important;
  outline-offset: 3px;
}

.tws-hub-surface .tws-growing-topic-groups-v2 {
  display: block !important;
  width: 100%;
}
.tws-hub-surface .tws-hub-topic-grid {
  margin-block-end: 1rem;
}
.tws-hub-surface .tws-hub-collections {
  margin-block: clamp(26px, 4vw, 52px);
}
.tws-hub-collections h2 {
  margin: 0 0 .65em;
}
.tws-hub-surface .tool-copy-grid {
  grid-template-columns: minmax(0, 1fr);
}
.tws-hub-surface .tws-hub-ad-break {
  grid-column: 1 / -1 !important;
  min-width: 0;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
.tws-hub-surface .tws-hub-ad-break > .mantis-slot {
  width: 100% !important;
}
@media (min-width: 761px) and (max-width: 1279px) {
  /* Use the viewport center when a nested collection has narrow gutters. */
  .tws-hub-surface .tws-hub-ad-break > .mantis-slot {
    position: relative;
    left: 50%;
    width: max(100%, 728px) !important;
    margin-inline: 0 !important;
    transform: translateX(-50%);
  }
}
.tws-hub-surface.rh-filtered .tws-hub-ad-break,
.tws-hub-surface .rc-grid:has(> li[data-recipe-item][hidden]) > .tws-hub-ad-break {
  order: 1;
}

.tws-hub-surface .tws-hub-endcap {
  isolation: isolate;
  position: relative;
  box-sizing: border-box;
  width: min(1160px, calc(100% - 32px));
  margin: clamp(30px, 5vw, 66px) auto clamp(32px, 5vw, 68px);
  padding: clamp(18px, 4vw, 46px);
  color: var(--hub-ink);
  background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--hub-accent) 15%, var(--hub-dark)), transparent 65%), var(--hub-dark);
  border: 1px solid var(--hub-line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--hub-accent) 28%, transparent);
  clear: both;
}
.tws-hub-surface.rh-main > .tws-hub-endcap,
.tws-hub-surface :is(.rc-main, .article) > .tws-hub-endcap {
  width: 100%;
}
.tws-hub-surface .tws-hub-endcap-intro {
  margin: 0 0 clamp(16px, 3vw, 30px);
}
.tws-hub-surface .tws-hub-endcap-intro .tws-hub-endcap-kicker {
  margin: 0 0 10px !important;
  color: var(--hub-accent) !important;
  font: 750 .7rem/1.4 system-ui, sans-serif !important;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.tws-hub-surface .tws-hub-endcap h2 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  color: var(--hub-ink) !important;
  font: 500 clamp(1.9rem, 4.2vw, 3.6rem)/1.04 Georgia, serif !important;
  letter-spacing: -.045em;
  border: 0 !important;
  overflow-wrap: anywhere;
}
.tws-hub-surface .tws-hub-endcap-intro p {
  max-width: 61ch;
  margin: 0 !important;
  color: var(--hub-muted);
  font: 400 .95rem/1.55 system-ui, sans-serif;
}
.tws-hub-endcap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
}
.tws-hub-surface .tws-hub-spotlight {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: clamp(190px, 22vw, 300px);
  padding: clamp(15px, 2vw, 28px);
  margin: 0;
  border: 1px solid var(--hub-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--hub-card);
  color: var(--hub-ink) !important;
  text-decoration: none !important;
}
.tws-hub-surface .tws-hub-spotlight::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(0deg, rgba(4, 8, 9, .96), rgba(4, 8, 9, .62) 30%, transparent 76%);
  pointer-events: none;
}
.tws-hub-surface .tws-hub-spotlight img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  object-fit: cover;
  object-position: center 52%;
}
.tws-hub-surface .tws-hub-spotlight:hover {
  border-color: var(--hub-accent);
}
.tws-hub-spotlight-copy > span {
  display: block;
  margin-bottom: 5px;
  color: var(--hub-accent);
  font: 750 .7rem/1.4 system-ui, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.tws-hub-surface .tws-hub-spotlight-copy strong {
  color: var(--hub-ink);
  font: 500 clamp(1.45rem, 3vw, 2.55rem)/1.1 Georgia, serif;
  overflow-wrap: anywhere;
}
.tws-hub-spotlight > span {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  border: 1px solid var(--hub-accent);
  border-radius: 100%;
  color: var(--hub-accent);
  background: rgba(4, 8, 9, .6);
  font: 700 1rem/1 system-ui, sans-serif;
}
.tws-hub-endcap-links {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}
.tws-hub-surface .tws-hub-endcap-links > .tws-hub-card {
  min-height: 72px !important;
  padding: 10px !important;
}
@media (min-width: 661px) {
  .tws-hub-surface .tws-hub-endcap-links > .tws-hub-card {
    grid-template-columns: clamp(72px, 9vw, 136px) minmax(0, 1fr) 16px !important;
  }
}
.tws-hub-surface .tws-hub-endcap-more {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
  margin-top: 16px;
  padding-top: 7px;
  border-top: 1px solid var(--hub-line);
}
.tws-hub-surface .tws-hub-endcap-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hub-accent) !important;
  font: 700 .79rem/1.3 system-ui, sans-serif !important;
  text-decoration: underline;
  text-underline-offset: .22em;
  text-transform: none;
  letter-spacing: normal;
}

@media (max-width: 660px) {
  .tws-hub-surface .tws-hub-card-grid,
  .tws-hub-endcap-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .tws-hub-surface .tws-hub-card {
    grid-template-columns: 64px minmax(0, 1fr) 16px !important;
  }
  .tws-hub-surface .tws-hub-endcap {
    border-radius: 14px;
  }
  .tws-hub-surface .tws-hub-spotlight {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}
