/* Discover, built from scratch on 2 October 2026 and rebuilt on 23 October around four sections (discover3.js
   draws it; the reviewer's levels and scores, through rank.js, decide what goes where). Everything on this page is a
   real post or a real account. Four quiet lists, every card with the reason it is here on its first line.
   Colours follow the theme; a post with no picture gets a cover drawn from its own field and words. */

#main-content > [data-viewpanel="discover"] { max-width: 1120px !important; margin-left: auto; margin-right: auto; }
#main-content > [data-viewpanel="topicdetail"] { max-width: 860px !important; margin-left: auto; margin-right: auto; }

.dx { --dx-r: 18px; display: flex; flex-direction: column; gap: 36px; padding-bottom: 48px; color: var(--color-foreground); }
:where(.dx) button { font: inherit; color: inherit; text-align: left; }
:where(.dx) :where(h1, h2, h3, p) { margin: 0; }

/* ── head: the title, the period, the fields ── */
.dx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.dx-head h1 { font-size: 32px; font-weight: 600; letter-spacing: -.022em; line-height: 1.1; }
.dx-head p { margin-top: 8px; max-width: 60ch; font-size: 15px; line-height: 1.5; color: var(--color-muted-foreground); text-wrap: pretty; }
.dx-link { color: var(--color-brand-ink); font-weight: 550; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-brand) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .15s var(--ease-out); }
.dx-link:hover { text-decoration-color: currentColor; }
/* ── covers: the post's picture, or a trace drawn from its own field and words ── */
.dx-cover { --h: 290; position: relative; display: block; overflow: hidden; background: linear-gradient(140deg, oklch(.3 .055 var(--h)), oklch(.2 .03 calc(var(--h) + 30))); isolation: isolate; }
html.light .dx-cover { background: linear-gradient(140deg, oklch(.95 .035 var(--h)), oklch(.89 .06 calc(var(--h) + 30))); }
.dx-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease-out); }
.dx-cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); pointer-events: none; }
html.light .dx-cover::after { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.dx-trace { position: absolute; inset: 0; width: 100%; height: 100%; }
.dx-trace path { fill: none; stroke: oklch(.8 .15 var(--h)); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.dx-trace path + path { stroke: oklch(.8 .15 calc(var(--h) + 40)); opacity: .38; }
html.light .dx-trace path { stroke: oklch(.52 .17 var(--h)); }
html.light .dx-trace path + path { stroke: oklch(.52 .17 calc(var(--h) + 40)); }
.dx-cover__word { position: absolute; left: 6%; right: 6%; bottom: 7%; font-weight: 600; letter-spacing: -.03em; line-height: .98; color: oklch(.95 .04 var(--h)); font-size: clamp(15px, 13cqw, 64px); text-wrap: balance; overflow-wrap: anywhere; }
html.light .dx-cover__word { color: oklch(.3 .09 var(--h)); }
.dx-cover { container-type: inline-size; }
.dx-cover__badge { position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgb(0 0 0 / .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 11.5px; font-weight: 550; }

/* ── a tag: why a post is here ── */
.dx-why { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.dx-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--color-foreground) 7%, transparent); font-size: 12px; font-weight: 550; color: var(--oryn-text-2); white-space: nowrap; }
.dx-tag--lead { background: var(--brand-soft, var(--oryn-brand-tint)); color: var(--color-brand-ink); }
.dx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--color-brand); color: var(--color-primary-foreground); transition: background-color .15s var(--ease-out); }
.dx-btn:hover { background: var(--color-brand-hover); }

/* ── section heads ── */
.dx-sec > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.dx-sec h2 { font-size: 19px; font-weight: 600; letter-spacing: -.012em; }
.dx-sec > header span { font-size: 13px; color: var(--color-muted-foreground); }

/* ── the lists: a card per post, its cover on the left ── */
.dx-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 16px; margin: 0 -10px; padding: 12px 10px; border-radius: 14px; transition: background-color .18s var(--ease-out); }
.dx-item:hover { background: var(--oryn-surface-hover); }
.dx-item:hover .dx-cover img { scale: 1.05; }
.dx-thumb.dx-cover { width: 92px; aspect-ratio: 4 / 3; border-radius: 11px; }
.dx-item__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 15px; font-weight: 550; line-height: 1.32; letter-spacing: -.006em; }
.dx-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 12.5px; color: var(--color-muted-foreground); }
.dx-item__meta .dx-tag { height: 21px; padding: 0 7px; font-size: 11.5px; }
.dx-item--wide { grid-template-columns: 120px minmax(0, 1fr); }
.dx-item--wide .dx-thumb.dx-cover { width: 120px; }
.dx-item__sum { margin-top: 5px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13.5px; line-height: 1.5; color: var(--oryn-text-2); }
/* the four sections of 23 October 2026: every card says why it is here, on its first line */
.dx-list .dx-item--why { align-items: start; padding: 14px 10px; }
.dx-list .dx-item--why + .dx-item--why { border-top: 1px solid var(--color-border); border-radius: 0 0 14px 14px; }
.dx-list .dx-item--why:hover { border-radius: 14px; }
.dx-item__why { display: block; margin-bottom: 7px; }
.dx-item__why .dx-tag { height: auto; min-height: 24px; padding: 3px 10px; white-space: normal; line-height: 1.3; text-align: left; }
.dx-sec__none { margin: 0; padding: 22px 20px; border: 1px dashed var(--color-border); border-radius: 16px; font-size: 14px; line-height: 1.5; color: var(--color-muted-foreground); }
.dx-sec__act { margin-left: 6px; font-weight: 600; color: var(--color-brand-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-brand) 35%, transparent); text-underline-offset: 3px; }
.dx-sec__act:hover { text-decoration-color: currentColor; }

/* ── who is posting ── */
.dx-voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 14px; }
/* a person as a quiet tile: the portrait over a breath of their field's colour, who they are, what they did, one button */
.dx-voice { --h: 255; position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 24px 16px 16px; overflow: hidden; border: 1px solid var(--frost-line, var(--color-border)); border-radius: 22px; background: radial-gradient(220px 150px at 100% 0%, oklch(.78 .1 var(--h) / .16), transparent 72%), var(--color-card); box-shadow: var(--frost-rim, none), var(--frost-shadow, none); text-align: center; transition: border-color .18s var(--ease-out), box-shadow .3s var(--ease-out), translate .42s var(--frost-ease, var(--ease-out)); }
@media (hover: hover) { .dx-voice:hover { border-color: var(--oryn-border-hover); box-shadow: var(--frost-rim, none), var(--frost-shadow-up, none); translate: 0 -2px; } .dx-voice:hover .dx-voice__pic > * { scale: 1.03; } }
.dx-voice__pic { position: relative; display: block; border-radius: 50%; box-shadow: 0 0 0 3px var(--color-card), 0 0 0 4px var(--frost-line, var(--color-border)); }
.dx-voice__pic > * { width: 72px !important; height: 72px !important; border: 0 !important; transition: scale .4s var(--frost-ease, var(--ease-out)); }
.dx-voice__who { position: relative; display: block; width: 100%; min-width: 0; margin-top: 14px; text-align: center; }
.dx-voice__name { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 6px; margin: 0; }
.dx-voice__open { display: block; min-width: 0; max-width: 100%; border-radius: 8px; color: var(--color-foreground); }
.dx-voice__open b { display: block; overflow: hidden; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.dx-voice__open:hover b { text-decoration: underline; text-underline-offset: 3px; }
.dx-voice__where { display: block; margin-top: 3px; overflow: hidden; font-size: 13px; color: var(--color-muted-foreground); text-overflow: ellipsis; white-space: nowrap; }
.dx-voice__who small { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 500; color: var(--oryn-text-2); }
.dx-voice .follow-btn { width: 100%; height: 40px; margin-top: 14px; border: 1px solid var(--frost-line, var(--color-border)); border-radius: 999px; background: var(--frost-strong, var(--color-card)); box-shadow: var(--frost-rim, none); font-size: 14px; font-weight: 600; color: var(--oryn-text-2); }
.dx-voice .follow-btn:hover { border-color: var(--oryn-border-hover); background: var(--frost-strong, var(--color-card)); color: var(--color-foreground); }
.dx-voice .follow-btn.is-following, .dx-voice .follow-btn.is-following:hover { border-color: color-mix(in srgb, var(--color-brand) 55%, transparent); background: var(--brand-soft); color: var(--color-brand-ink); }

.dx-voice__seal { flex: none; font-size: 15px; color: var(--color-brand); }

/* ── how it is ranked, and the empty page ── */
.dx-how { display: grid; grid-template-rows: 0fr; margin-top: -24px; transition: grid-template-rows .34s var(--ease-out), margin-top .34s var(--ease-out); }
.dx-how.is-open { grid-template-rows: 1fr; margin-top: -12px; }
.dx-how > div { overflow: hidden; }
.dx-how ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 28px; margin: 0; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-card); list-style: none; font-size: 13.5px; line-height: 1.5; color: var(--oryn-text-2); }
.dx-how li b { display: block; font-weight: 600; color: var(--color-foreground); }
.dx-empty { display: grid; justify-items: center; gap: 10px; padding: 72px 24px; border: 1px dashed var(--color-border); border-radius: 22px; text-align: center; }
.dx-empty h2 { font-size: 20px; font-weight: 600; }
.dx-empty p { max-width: 46ch; font-size: 14.5px; line-height: 1.55; color: var(--color-muted-foreground); }

/* ── the topic page ── */
.dx-back { display: inline-flex; align-items: center; gap: 7px; height: 36px; margin: 0 0 -14px -8px; padding: 0 10px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--color-muted-foreground); transition: color .15s var(--ease-out), background-color .15s var(--ease-out); align-self: flex-start; }
.dx-back:hover { color: var(--color-foreground); background: var(--oryn-surface-hover); }
.dx-thead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; min-height: 176px; padding: 30px 30px 28px; border-radius: 26px; }
.dx-thead.dx-cover { container-type: normal; }
.dx-thead h1 { position: relative; font-size: clamp(30px, 5vw, 46px); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; color: oklch(.96 .03 var(--h)); text-wrap: balance; }
.dx-thead p { position: relative; margin-top: 12px; font-size: 14.5px; color: oklch(.86 .04 var(--h)); }
html.light .dx-thead h1 { color: oklch(.26 .08 var(--h)); }
html.light .dx-thead p { color: oklch(.4 .06 var(--h)); }
/* the trace runs on the right half and fades toward the words */
.dx-thead .dx-trace { opacity: .6; -webkit-mask-image: linear-gradient(to right, transparent 34%, #000 78%); mask-image: linear-gradient(to right, transparent 34%, #000 78%); }
.dx-follow { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--color-brand); color: var(--color-primary-foreground); box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 8px 18px -10px var(--color-brand); font-size: 14px; font-weight: 600; white-space: nowrap; transition: opacity .15s var(--ease-out); }
.dx-follow:hover { opacity: .88; }
.dx-follow[aria-pressed="true"] { background: color-mix(in srgb, var(--color-card) 78%, transparent); color: var(--color-foreground); box-shadow: var(--frost-rim, none), 0 0 0 1px color-mix(in srgb, var(--color-foreground) 12%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.dx-list { display: flex; flex-direction: column; }

/* ── phones: the lists one column ── */
@media (max-width: 899.98px) {
  .dx { gap: 30px; }
  .dx-head h1 { font-size: 27px; }
  .dx-thead { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .dx-item--wide { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .dx-item--wide .dx-thumb.dx-cover { width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .dx-cover img, .dx-how { transition: none; }
}
@media (max-width: 640px) { .dx-sec > header { flex-direction: column; align-items: flex-start; gap: 2px; } }

/* ── a touch screen: 44px to the finger, the look unchanged (an ::after nobody sees takes the press) ── */
@media (pointer: coarse) {
  .dx-link, .dx-back, .dx-sec__act { position: relative; }
  .dx-link::after, .dx-back::after, .dx-sec__act::after { content: ''; position: absolute; }
  .dx-link::after, .dx-sec__act::after { inset: -11px 0; }
  .dx-back::after { inset: -4px 0; }
  /* the name on a person tile is its only button (3 October, the tiles rebuilt the same day as this audit) */
  .dx-voice__open { position: relative; }
  .dx-voice__open::after { content: ''; position: absolute; inset: -11px 0; }
}
