/* Discover, second pass (18 November 2026). The owner: the inner places have "muy poco diseño, muy poco cariño", improve them a lot.
   Loaded last (index.html), over the clean layer; tokens of the clean look only (--cl-*). Scoped to #discoverRoot: the
   topic page and the other places that borrow a Discover cover keep their own look.

   The page: the serif title and one calm line over the lilac field; a row of chips that take the page to each section;
   each section headed by its icon on a tinted tile, its first post drawn large and the rest as a tidy grid of cards; the
   reason a post is here as a small tinted label; a soft panel when a section is empty; colleagues as a row of cards.
   Things rise into place a beat apart as they come into view; nothing turns and nothing follows the pointer. */

/* 1. One colour for every section: lilac for emphasis, grey tiles (19 November: no colour per section) -------------------------------------------------------------- */
#discoverRoot { --dx-ink: color-mix(in srgb, var(--cl-lilac) 66%, var(--cl-ink)); --dx-hue: var(--cl-lilac); --dx-deep: var(--cl-lilac); }
#discoverRoot :is(.dx-chip__ic, .dx-sec__ic, .dx-how__ic) {
  display: grid; flex: none; place-items: center;
  background: var(--cl-surface-2); color: var(--cl-ink-3);
}

/* on the dark page the deep hues sink: the icons and labels take the light hue instead, on a firmer tint */
html:not(.light) #discoverRoot :is(.dx-chip__ic, .dx-sec__ic, .dx-how__ic) { background: color-mix(in srgb, var(--dx-hue) 22%, var(--cl-surface)); color: color-mix(in srgb, var(--dx-hue) 78%, var(--cl-ink)); }
html:not(.light) #discoverRoot :is(.dx-item__why .dx-tag, .dx-voice__who small) { background: color-mix(in srgb, var(--dx-hue) 17%, var(--cl-surface)); color: color-mix(in srgb, var(--dx-hue) 62%, var(--cl-ink)); }
html:not(.light) #discoverRoot .dx-why__score { background: color-mix(in srgb, var(--dx-hue) 30%, var(--cl-surface)); }

/* 2. The page and its head ---------------------------------------------------------------------------------------- */
#discoverRoot .dx { gap: 60px; padding-bottom: 72px; }
#discoverRoot .dx-head { display: block; }
#discoverRoot .dx-head p { max-width: 60ch; }
#discoverRoot .dx--still :is(.dx-head h1, .dx-head p, .dx-chip) { animation: none; }

/* the chips: one per section, then How it is ranked */
#discoverRoot .dx-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
#discoverRoot .dx-chip {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px 0 5px;
  border: 1px solid var(--cl-line-2); border-radius: 999px; background: var(--cl-surface); box-shadow: var(--cl-shadow-1);
  font-size: 14.5px; line-height: 1; color: var(--cl-ink-2); white-space: nowrap; cursor: pointer;
  transition: border-color .18s var(--cl-out), color .18s var(--cl-out), background-color .18s var(--cl-out), box-shadow .3s var(--cl-out), translate .4s var(--cl-spring);
  animation: dx-rise .6s var(--cl-spring) backwards; animation-delay: calc(110ms + var(--i, 0) * 45ms);
}
#discoverRoot .dx-chip__ic { width: 28px; height: 28px; border-radius: 50%; font-size: 15px; }
#discoverRoot .dx-chip--how { gap: 7px; margin-left: auto; padding: 0 16px 0 13px; border-color: color-mix(in srgb, var(--cl-lilac) 34%, transparent); background: transparent; box-shadow: none; color: var(--dx-ink); }
#discoverRoot .dx-chip--how i { font-size: 17px; }
#discoverRoot .dx-chip--how[aria-expanded="true"] { border-color: color-mix(in srgb, var(--cl-lilac) 45%, transparent); background: color-mix(in srgb, var(--cl-lilac) 14%, var(--cl-surface)); color: color-mix(in srgb, var(--cl-lilac) 66%, var(--cl-ink)); }
@media (hover: hover) {
  #discoverRoot .dx-chip:hover { border-color: var(--cl-line-3); color: var(--cl-ink); translate: 0 -1px; box-shadow: var(--cl-shadow-2); }
  #discoverRoot .dx-chip--how:hover { border-color: color-mix(in srgb, var(--cl-lilac) 55%, transparent); color: var(--dx-ink); box-shadow: none; }
}

/* How it is ranked: a soft lilac panel, the four sections with their icons */
#discoverRoot .dx-how { margin-top: 0; transition: grid-template-rows .45s var(--cl-spring), margin-top .45s var(--cl-spring); }
#discoverRoot .dx-how.is-open { margin-top: 16px; }
#discoverRoot .dx-how ul {
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; padding: 24px 26px;
  border: 1px solid color-mix(in srgb, var(--cl-lilac) 22%, transparent); border-radius: 20px; background: color-mix(in srgb, var(--cl-lilac) 6%, var(--cl-surface));
  font-size: 14px; line-height: 1.55; color: var(--cl-ink-3);
}
#discoverRoot .dx-how li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 14px; opacity: 0; transform: translateY(6px); transition: opacity .3s var(--cl-out), transform .5s var(--cl-spring); }
#discoverRoot .dx-how.is-open li { opacity: 1; transform: none; }
#discoverRoot .dx-how.is-open li:nth-child(2) { transition-delay: 45ms; }
#discoverRoot .dx-how.is-open li:nth-child(3) { transition-delay: 90ms; }
#discoverRoot .dx-how.is-open li:nth-child(4) { transition-delay: 135ms; }
#discoverRoot .dx-how__ic { width: 32px; height: 32px; border-radius: 10px; font-size: 17px; }
#discoverRoot .dx-how li b { display: block; margin-bottom: 3px; font-size: 15px; font-weight: 400; color: var(--cl-ink); }

/* 3. A section's heading ------------------------------------------------------------------------------------------ */
#discoverRoot .dx-sec { scroll-margin-top: 28px; animation: none; }
#discoverRoot .dx-sec > .dx-sec__head { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: 0 14px; margin-bottom: 22px; }
#discoverRoot .dx-sec__head .dx-sec__ic { width: 32px; height: 32px; margin-top: 2px; border-radius: 10px; font-size: 17px; }
#discoverRoot .dx-sec__words { min-width: 0; }
#discoverRoot .dx-sec h2 { line-height: 1.2; border-radius: 6px; }
#discoverRoot .dx-sec h2:focus:not(:focus-visible) { outline: none; }
#discoverRoot .dx-sec__head .dx-sec__sub { display: block; margin-top: 5px; font-size: 14.5px; line-height: 1.45; color: var(--cl-ink-3); text-wrap: pretty; }
#discoverRoot .dx-sec__all {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; margin-top: 1px; padding: 0 12px 0 15px;
  border: 1px solid var(--cl-line-2); border-radius: 999px; font-size: 14px; color: var(--cl-ink-2); white-space: nowrap;
  transition: border-color .18s var(--cl-out), color .18s var(--cl-out);
}
#discoverRoot .dx-sec__all i { font-size: 14px; transition: transform .35s var(--cl-spring); }
@media (hover: hover) { #discoverRoot .dx-sec__all:hover { border-color: var(--cl-line-3); color: var(--cl-ink); } #discoverRoot .dx-sec__all:hover i { transform: translateX(2px); } }

/* 4. The cards: the first one large, the rest a tidy grid --------------------------------------------------------- */
#discoverRoot .dx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
#discoverRoot .dx-grid > .dx-item,
#discoverRoot .dx-grid > .dx-item + .dx-item,
#discoverRoot .dx-grid > .dx-item:hover {
  position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: start; gap: 16px; margin: 0; padding: 12px 18px 14px 12px;
  border: 1px solid var(--cl-line-2); border-radius: 20px; background: var(--cl-surface);
}
#discoverRoot .dx-grid > .dx-item {
  transition: border-color .2s var(--cl-out), box-shadow .35s var(--cl-out), translate .45s var(--cl-spring);
}
@media (hover: hover) {
  #discoverRoot .dx-grid > .dx-item:hover { border-color: var(--cl-line-3); translate: 0 -2px; box-shadow: var(--cl-shadow-2); }
  #discoverRoot .dx-grid > .dx-item:hover .dx-cover img { scale: 1.03; }
}
#discoverRoot .dx-grid .dx-thumb.dx-cover { width: 104px; aspect-ratio: 1; border-radius: 13px; }
#discoverRoot .dx-item__body { display: flex; min-width: 0; flex-direction: column; }
#discoverRoot .dx-grid .dx-item__title { font-size: 17.5px; line-height: 1.3; -webkit-line-clamp: 3; }
#discoverRoot .dx-grid .dx-item__sum { display: none; }
#discoverRoot .dx-grid .dx-item__meta { gap: 2px 0; margin-top: 8px; font-size: 13px; color: var(--cl-ink-4); }
#discoverRoot .dx-grid .dx-item__meta > span + span::before { content: '\00B7'; margin: 0 7px; }
#discoverRoot .dx-grid .dx-item__meta { flex-wrap: nowrap; }
#discoverRoot .dx-grid .dx-item__meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#discoverRoot .dx-grid .dx-item__meta > span + span { flex: none; }
/* a card left alone on the last line takes the whole width, and room for its summary */
#discoverRoot .dx-grid > .dx-item:not(:first-child):nth-child(even):last-child { grid-column: 1 / -1; }
#discoverRoot .dx-grid > .dx-item:not(:first-child):nth-child(even):last-child .dx-item__sum { display: -webkit-box; -webkit-line-clamp: 2; margin-top: 6px; font-size: 14.5px; }

/* the first post of a section, large: its picture beside the words */
#discoverRoot .dx-grid > .dx-item:first-child,
#discoverRoot .dx-grid > .dx-item:first-child:hover { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); align-items: stretch; gap: 30px; padding: 10px; }
#discoverRoot .dx-grid > .dx-item:first-child .dx-thumb.dx-cover { width: 100%; height: 100%; min-height: 272px; aspect-ratio: auto; border-radius: 14px; }
#discoverRoot .dx-grid > .dx-item:first-child .dx-item__body { padding: 18px 22px 12px 0; }
#discoverRoot .dx-grid > .dx-item:first-child .dx-item__title { font-size: 26px; line-height: 1.22; letter-spacing: -.012em; -webkit-line-clamp: 3; text-wrap: pretty; }
#discoverRoot .dx-grid > .dx-item:first-child .dx-item__sum { display: -webkit-box; -webkit-line-clamp: 4; margin-top: 12px; font-size: 15.5px; line-height: 1.58; color: var(--cl-ink-2); }
#discoverRoot .dx-grid > .dx-item:first-child .dx-item__meta { margin-top: auto; padding-top: 20px; }

/* why it is here: a small label in the section's colour; a score keeps its own pill */
#discoverRoot .dx-item__why { display: block; margin-bottom: 9px; }
#discoverRoot .dx-item__why .dx-tag {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; max-width: 100%; height: auto; min-height: 24px; padding: 3px 10px;
  border-radius: 8px; background: color-mix(in srgb, var(--dx-hue) 12%, var(--cl-surface)); color: color-mix(in srgb, var(--dx-deep) 80%, var(--cl-ink));
  font-size: 12.5px; line-height: 1.35; white-space: normal;
}
#discoverRoot .dx-why__txt { display: inline-block; }
#discoverRoot .dx-why__txt::first-letter { text-transform: uppercase; }
#discoverRoot .dx-why__pre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
#discoverRoot .dx-why__score { margin-left: -6px; padding: 1px 7px; border-radius: 6px; background: color-mix(in srgb, var(--dx-hue) 26%, var(--cl-surface)); font-variant-numeric: tabular-nums; }

/* 5. An empty section, and the empty page: a soft panel, never a grey box ------------------------------------------- */
#discoverRoot .dx-none, #discoverRoot .dx-empty {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 38px 24px 34px;
  border: 1px solid color-mix(in srgb, var(--cl-lilac) 20%, transparent); border-radius: 20px; background: color-mix(in srgb, var(--cl-lilac) 6%, var(--cl-surface));
  text-align: center;
}
#discoverRoot .dx-none__ic { display: grid; width: 48px; height: 48px; margin-bottom: 16px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--cl-lilac) 17%, var(--cl-surface)); color: var(--dx-ink); font-size: 22px; }
#discoverRoot :is(.dx-none__t, .dx-empty h2) { font-family: var(--cl-serif); font-size: 21px; font-weight: 400; line-height: 1.3; letter-spacing: -.005em; color: var(--cl-ink); text-wrap: balance; }
#discoverRoot :is(.dx-none__s, .dx-empty p) { max-width: 46ch; margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--cl-ink-3); text-wrap: pretty; }
#discoverRoot .dx-soft {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; margin-top: 20px; padding: 0 17px 0 14px;
  border: 1px solid color-mix(in srgb, var(--cl-lilac) 42%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--cl-lilac) 14%, var(--cl-surface));
  font-size: 14.5px; color: var(--dx-ink); cursor: pointer; transition: border-color .18s var(--cl-out), filter .18s var(--cl-out);
}
#discoverRoot .dx-soft i { font-size: 16px; }
@media (hover: hover) { #discoverRoot .dx-soft:hover { border-color: color-mix(in srgb, var(--cl-lilac) 65%, transparent); filter: saturate(1.15); } }

/* 6. Colleagues: a row of person cards ---------------------------------------------------------------------------- */
#discoverRoot .dx-voices {
  display: grid; grid-auto-flow: column; grid-auto-columns: 204px; grid-template-columns: none; justify-content: start; gap: 14px;
  margin: -8px -8px 0; padding: 8px 8px 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 8px;
  scrollbar-width: thin; scrollbar-color: var(--cl-line-3) transparent;
}
#discoverRoot .dx-voice,
#discoverRoot .dx-voice:hover {
  padding: 0 16px 16px; border: 1px solid var(--cl-line-2); border-radius: 20px; scroll-snap-align: start;
  background: var(--cl-surface) !important;
}
#discoverRoot .dx-voice { transition: border-color .2s var(--cl-out), box-shadow .35s var(--cl-out), translate .45s var(--cl-spring); }
@media (hover: hover) { #discoverRoot .dx-voice:hover { border-color: var(--cl-line-3); translate: 0 -2px; box-shadow: var(--cl-shadow-2); } }
#discoverRoot .dx-voice__pic { margin-top: 24px; box-shadow: 0 0 0 4px var(--cl-surface), 0 0 0 5px var(--cl-line-2); }
#discoverRoot .dx-voice__pic > * { width: 68px !important; height: 68px !important; }
#discoverRoot .dx-voice__who { display: flex; flex: 1; flex-direction: column; align-items: center; margin-top: 14px; }
#discoverRoot .dx-voice__name { max-width: 100%; }
#discoverRoot .dx-voice__open b { font-size: 18px; }
#discoverRoot .dx-voice__seal { font-size: 15px; color: var(--dx-ink); }
#discoverRoot .dx-voice__where { max-width: 100%; margin-top: 3px; font-size: 13.5px; color: var(--cl-ink-3); }
#discoverRoot .dx-voice__who small {
  display: inline-block; max-width: 100%; margin-top: 12px; padding: 3px 9px; border-radius: 8px;
  background: color-mix(in srgb, var(--dx-hue) 12%, var(--cl-surface)); color: color-mix(in srgb, var(--dx-deep) 80%, var(--cl-ink)); font-size: 12.5px; line-height: 1.35;
}
/* Follow, as the Menu's New post: soft lilac, its icon in a small deep lilac circle */
#discoverRoot .dx-voice .follow-btn {
  gap: 8px; width: 100%; height: 40px; margin-top: 16px; padding: 0 14px 0 10px;
  border: 1px solid color-mix(in srgb, var(--cl-lilac) 42%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--cl-lilac) 14%, var(--cl-surface));
  font-size: 14.5px; color: var(--dx-ink); transition: border-color .18s var(--cl-out), filter .18s var(--cl-out);
}
#discoverRoot .dx-voice .follow-btn .fb-ic { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--dx-ink); color: var(--cl-surface); }
#discoverRoot .dx-voice .follow-btn:hover { border-color: color-mix(in srgb, var(--cl-lilac) 65%, transparent); color: var(--dx-ink); filter: saturate(1.15); }
#discoverRoot .dx-voice .follow-btn.is-following, #discoverRoot .dx-voice .follow-btn.is-following:hover { border-color: var(--cl-line-2); background: var(--cl-surface-2); color: var(--cl-ink-2); filter: none; }
#discoverRoot .dx-voice .follow-btn.is-following .fb-ic { background: transparent; color: var(--cl-ink-3); }

/* 7. Focus --------------------------------------------------------------------------------------------------------- */
#discoverRoot :is(a, button, h2):focus-visible { outline: 2px solid var(--cl-lilac); outline-offset: 2px; }

/* 8. Motion: each section rises in as it comes into view, its cards a beat apart (discover3.js marks it .is-in) ------ */
@keyframes dx-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#discoverRoot .dx--io .dx-sec:not(.is-in) > * { opacity: 0; }
#discoverRoot .dx--io .dx-sec.is-in > .dx-sec__head { animation: dx-rise .6s var(--cl-spring) backwards; }
#discoverRoot .dx--io .dx-sec.is-in :is(.dx-grid > *, .dx-voices > *, .dx-none) { animation: dx-rise .7s var(--cl-spring) backwards; animation-delay: 70ms; }
#discoverRoot .dx--io .dx-sec.is-in .dx-grid > :nth-child(2) { animation-delay: 120ms; }
#discoverRoot .dx--io .dx-sec.is-in .dx-grid > :nth-child(3) { animation-delay: 165ms; }
#discoverRoot .dx--io .dx-sec.is-in .dx-grid > :nth-child(4) { animation-delay: 210ms; }
#discoverRoot .dx--io .dx-sec.is-in .dx-grid > :nth-child(5) { animation-delay: 255ms; }
#discoverRoot .dx--io .dx-sec.is-in .dx-voices > * { animation-delay: calc(70ms + var(--i, 0) * 50ms); }
#discoverRoot .dx-empty { animation: dx-rise .7s var(--cl-spring) .1s backwards; }
#discoverRoot .dx--still .dx-empty { animation: none; }

/* 9. Below a computer's width: the chips scroll, the large card stands over its words, one column ----------------- */
@media (max-width: 1023.98px) {
  #discoverRoot .dx { gap: 52px; }
  #discoverRoot .dx-jump { flex-wrap: nowrap; margin: 22px -16px 0; padding: 2px 16px 8px; overflow-x: auto; scroll-padding: 0 16px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
  #discoverRoot .dx-jump::-webkit-scrollbar { display: none; }
  #discoverRoot .dx-chip { flex: none; }
  #discoverRoot .dx-voices { margin: -8px -16px 0; padding: 8px 16px 14px; scroll-padding: 0 16px; scrollbar-width: none; }
  #discoverRoot .dx-voices::-webkit-scrollbar { display: none; }
}
@media (max-width: 719.98px) {
  #discoverRoot .dx { gap: 48px; }
  #discoverRoot .dx-how ul { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; }
  #discoverRoot .dx-sec > .dx-sec__head { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 0 12px; margin-bottom: 18px; }
  #discoverRoot .dx-sec__head .dx-sec__ic { width: 30px; height: 30px; font-size: 16px; }
  #discoverRoot .dx-sec h2 { font-size: 23px; }
  #discoverRoot .dx-sec__head .dx-sec__sub { font-size: 14px; }
  #discoverRoot .dx-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #discoverRoot .dx-grid > .dx-item,
  #discoverRoot .dx-grid > .dx-item + .dx-item,
  #discoverRoot .dx-grid > .dx-item:hover { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px 14px 12px 12px; }
  #discoverRoot .dx-grid .dx-thumb.dx-cover { width: 84px; border-radius: 12px; }
  #discoverRoot .dx-grid .dx-item__title { font-size: 17px; }
  #discoverRoot .dx-grid > .dx-item:not(:first-child):nth-child(even):last-child .dx-item__sum { display: none; }
  #discoverRoot .dx-grid > .dx-item:first-child,
  #discoverRoot .dx-grid > .dx-item:first-child:hover { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px; }
  #discoverRoot .dx-grid > .dx-item:first-child .dx-thumb.dx-cover { height: auto; min-height: 0; aspect-ratio: 16 / 9; border-radius: 13px; }
  #discoverRoot .dx-grid > .dx-item:first-child .dx-item__body { padding: 16px 10px 8px; }
  #discoverRoot .dx-grid > .dx-item:first-child .dx-item__title { font-size: 22px; }
  #discoverRoot .dx-grid > .dx-item:first-child .dx-item__sum { -webkit-line-clamp: 3; font-size: 15px; }
  #discoverRoot .dx-grid > .dx-item:first-child .dx-item__meta { padding-top: 14px; }
  #discoverRoot .dx-none, #discoverRoot .dx-empty { padding: 30px 20px 28px; }
  #discoverRoot .dx-voices { grid-auto-columns: 196px; }
}

/* 10. Still, for whoever asks for less motion ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #discoverRoot *, #discoverRoot *::before, #discoverRoot *::after { animation: none !important; transition-duration: .01ms !important; }
  #discoverRoot .dx--io .dx-sec:not(.is-in) > * { opacity: 1; }
  #discoverRoot :is(.dx-chip, .dx-grid > .dx-item, .dx-voice):hover { translate: none; }
}
html.a11y-reduce-motion #discoverRoot .dx--io .dx-sec:not(.is-in) > * { opacity: 1; }
