/* ==========================================================================
   Cennex — product previews
   Fluid layouts of the Cennex app previews for every screen size.
   ========================================================================== */

/* ==========================================================================
   1. Marketplace cards  (mk-*)
   ========================================================================== */
.mk-grid {
  position: relative;
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .82fr);
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 1180px) { .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .mk-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(86%, 340px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 20px;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .mk-grid::-webkit-scrollbar { display: none; }
  .mk-grid > * { scroll-snap-align: start; }
}
.mk-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid #DFE2D8;
  border-radius: 14px;
  overflow: hidden;
  color: var(--ink-text);
  font-family: var(--font-body);
  box-shadow: 0 1px 0 #E3E6DE;
}
.mk-banner { position: relative; aspect-ratio: 2.5 / 1; background: #0F1412; overflow: hidden; }
.mk-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.mk-body { display: flex; flex-direction: column; flex: 1; padding: 0 18px 18px; }
.mk-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -34px; position: relative; }
.mk-av { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px #fff; background: #2F5D4E; flex-shrink: 0; }
.mk-av img { width: 100%; height: 100%; object-fit: cover; }
.mk-game { width: 44px; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 3px #fff; position: relative; }
.mk-game img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.mk-game.is-all { aspect-ratio: 3 / 4; background: #0F1412; }
.mk-game.is-all .mosaic { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mk-game.is-all .mosaic img { width: 100%; height: 100%; aspect-ratio: auto; }
.mk-game.is-all::after { content: ''; position: absolute; inset: 0; background: rgba(10, 12, 11, .6); }
.mk-game.is-all b { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-family: var(--font-app); font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #fff; }
.mk-name { font-family: var(--font-app); font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-top: 12px; }
.mk-bio { font-size: 13.5px; color: #59665C; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-rate { display: flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 13.5px; color: #6B776F; }
.mk-rate svg { width: 14px; height: 14px; }
.mk-rate strong { font-weight: 700; color: var(--ink-text); }
.mk-about { font-size: 13.5px; line-height: 1.55; color: #3E4A42; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(13.5px * 1.55 * 2); }
.mk-svcs { margin-top: auto; padding-top: 16px; }
.mk-svc { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #F5F6F1; }
.mk-svc:first-child { border-radius: 10px 10px 0 0; }
.mk-svc + .mk-svc { border-top: 1px solid #E6E8E1; }
.mk-svc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-svc-t strong { font-size: 14px; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-svc-t span { font-size: 12.5px; color: #6B776F; }
.mk-svc b { font-family: var(--font-app); font-size: 15px; font-weight: 800; white-space: nowrap; }
.mk-more { display: block; width: 100%; text-align: left; padding: 11px 14px; background: #F5F6F1; border-top: 1px solid #E6E8E1; border-radius: 0 0 10px 10px; font-size: 13.5px; font-weight: 600; color: var(--app-green); }
.mk-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.mk-svcs .mk-svc:last-child { border-radius: 0 0 10px 10px; }
/* Invitation card: the empty slot is yours. */
.mk-yours {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 22px 22px;
  border-radius: 14px;
  border: 2px dashed #C9CDC2;
  background: transparent;
  color: var(--ink-text);
  min-height: 300px;
}
.mk-yours .plus { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--ink-950); color: var(--mint-400); margin-bottom: auto; }
.mk-yours .plus svg { width: 24px; height: 24px; }
.mk-yours h3 { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.08; margin-top: 28px; }
.mk-yours p { margin-top: 8px; font-size: .9375rem; color: var(--ink-sub); }
.mk-yours .btn { margin-top: 18px; align-self: flex-start; }
/* Phones: dots under the swipeable cards show where you are and jump between them. */
.mk-dots { display: none; }
@media (max-width: 680px) {
  .mk-dots:not([hidden]) { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
  .mk-dot { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; }
  .mk-dot::before { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #C3C8BE; transition: width .25s var(--ease-out), background-color .25s; }
  .mk-dot[aria-current="true"]::before { width: 22px; background: var(--ink-text); }
}

/* ==========================================================================
   2. Discover / people you may recognize  (dc-*)
   ========================================================================== */
.dc-panel {
  position: relative;
  background: #fff;
  color: var(--ink-text);
  border-radius: 18px;
  padding: 26px 26px 22px;
  box-shadow: 0 1px 0 rgba(11, 11, 21, .08), 0 40px 80px -40px rgba(11, 11, 21, .55);
  font-family: var(--font-body);
}
.dc-h, .ev-h b { display: block; font-family: var(--font-app); font-size: 21px; font-weight: 800; letter-spacing: -.01em; color: #0F1412; }
.dc-sub { font-size: 13.5px; color: #59665C; margin-top: 4px; max-width: 46ch; }
.dc-body { position: relative; margin-top: 16px; display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 64px; }
.dc-history { list-style: none; padding: 0; display: grid; gap: 14px; align-content: start; }
.dc-history-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6B776F; margin-bottom: -4px; }
.dc-src {
  position: relative;
  display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #E3E6DE;
  background: #F7F8F4;
  min-height: 62px;
}
.dc-src .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.dc-src .ico svg { width: 16px; height: 16px; }
.dc-src .ico-img { background: transparent; }
.dc-src .ico-img img { width: 30px; height: auto; }
.dc-src b { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.25; }
.dc-src small { display: block; font-size: 11px; color: #6B776F; margin-top: 2px; }
.dc-list { list-style: none; padding: 0; margin: 0; }
.dc-person { display: flex; align-items: center; gap: 14px; padding: 12px 10px; margin: 0 -10px; border-radius: 12px; min-height: 76px; }
.dc-person + .dc-person { margin-top: 2px; }
.dc-av { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; overflow: hidden; background: #2A2F36; }
.dc-av img { width: 100%; height: 100%; object-fit: cover; }
.dc-mid { flex: 1; min-width: 0; }
.dc-nm { display: block; font-family: var(--font-app); font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--ink-text); }
.dc-mid p { font-size: 14px; line-height: 1.45; color: #59665C; margin-top: 2px; }
.dc-ev { font-weight: 600; color: var(--ink-text); }
.dc-connect { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 14px; border-radius: 7px; background: var(--app-green); color: #fff; font-size: 12.5px; font-weight: 650; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .16); transition: background-color .15s; }
.dc-connect svg { width: 13px; height: 13px; }
.dc-connect:hover { background: var(--app-green-hover); }
.dc-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.dc-lines path { fill: none; stroke: #9DB8A9; stroke-width: 1.5; stroke-dasharray: 4 5; }
/* Reveal choreography: history chip, then its connector, then the person. */
.dc-panel.is-armed .dc-src, .dc-panel.is-armed .dc-person { opacity: 0; transform: translateY(10px); }
.dc-panel.is-armed .dc-lines path { opacity: 0; }
.dc-panel.is-armed .dc-src, .dc-panel.is-armed .dc-person, .dc-panel.is-armed .dc-lines path { transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.dc-panel.is-armed .is-on { opacity: 1 !important; transform: none !important; }
/* Phones: each piece of shared history sits right above the person it surfaced, joined by a short
   dashed line (the desktop connector lines need two columns). */
@media (max-width: 760px) {
  .dc-panel { padding: 20px 16px 14px; border-radius: 16px; }
  .dc-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dc-history, .dc-list { display: contents; }
  .dc-history-label, .dc-lines { display: none; }
  .dc-src { min-height: 0; padding: 9px 12px; margin-top: 14px; }
  .dc-src[data-dc-step="0"] { order: 1; margin-top: 4px; }
  .dc-person[data-dc-step="0"] { order: 2; }
  .dc-src[data-dc-step="1"] { order: 3; }
  .dc-person[data-dc-step="1"] { order: 4; }
  .dc-src[data-dc-step="2"] { order: 5; }
  .dc-person[data-dc-step="2"] { order: 6; }
  .dc-src b { font-size: 13px; }
  .dc-person { position: relative; margin: 0 -10px; padding-top: 16px; min-height: 0; }
  .dc-person::before { content: ''; position: absolute; left: 36px; top: 0; height: 16px; border-left: 1.5px dashed #9DB8A9; }
  .dc-person + .dc-person { margin-top: 0; }
}
@media (max-width: 420px) {
  .dc-connect .t { display: none; }
  .dc-connect { width: 34px; padding: 0; justify-content: center; }
}

/* ==========================================================================
   3. Opportunity search  (sd-*)
   ========================================================================== */
.sd-frame {
  position: relative;
  background: #fff;
  color: #0F1412;
  border-radius: 20px;
  padding: clamp(16px, 2.6vw, 32px);
  font-family: var(--font-body);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .8);
}
.sd-frame { pointer-events: none; user-select: none; }
.sd-bar {
  position: relative;
  display: flex; align-items: center; gap: clamp(10px, 1.6vw, 20px);
  height: clamp(60px, 6vw, 84px);
  padding: 0 clamp(10px, 1.4vw, 16px) 0 clamp(18px, 2.2vw, 28px);
  border: 2px solid #DFE2D8;
  border-radius: 14px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.sd-bar.is-focus { border-color: var(--app-green); box-shadow: 0 0 0 6px rgba(22, 122, 86, .1); }
.sd-bar > svg { width: clamp(22px, 2.4vw, 32px); height: clamp(22px, 2.4vw, 32px); color: #8A958C; flex-shrink: 0; }
.sd-input {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  height: 100%;
  overflow: hidden; white-space: nowrap;
  font-size: clamp(1.1rem, .8rem + 1.5vw, 2rem);
  font-weight: 500;
  letter-spacing: -.015em;
  color: #0F1412;
}
.sd-text { overflow: hidden; text-overflow: clip; }
.sd-text:empty::before { content: 'Search for jobs, scholarships, freelance and more'; color: #6B776F; }
.sd-caret { flex-shrink: 0; width: 2px; height: 1.1em; margin-left: 2px; background: var(--app-green); opacity: 0; }
.sd-bar.is-focus .sd-caret { opacity: 1; animation: sd-blink 1s steps(1, end) infinite; }
.sd-bar.is-typing .sd-caret { animation: none; opacity: 1; }
.sd-text:empty + .sd-caret { margin-left: 0; order: -1; }
@keyframes sd-blink { 50% { opacity: 0; } }
.sd-key {
  display: inline-flex; align-items: center; gap: 8px;
  height: clamp(40px, 4vw, 50px); padding: 0 clamp(12px, 1.4vw, 18px);
  border-radius: 9px;
  border: 1.5px solid #DFE2D8; border-bottom-width: 4px;
  background: #fff;
  font-size: clamp(.8rem, .7rem + .3vw, .95rem); font-weight: 700; color: #3E4A42;
  white-space: nowrap;
  transition: transform .1s, border-color .1s, color .1s, border-bottom-width .1s, background-color .15s;
}
.sd-key.is-down { transform: translateY(2px); border-bottom-width: 2px; border-color: var(--app-green); color: var(--app-green); }
.sd-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sd-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 1px solid #DFE2D8; border-radius: 8px;
  background: #fff;
  font-size: .9375rem; font-weight: 600; color: #2A322D;
  white-space: nowrap;
  transition: border-color .2s, color .2s, background-color .2s, transform .2s var(--ease-out);
}
.sd-chip svg { width: 13px; height: 13px; opacity: .6; }
.sd-chip.is-set { border-color: var(--app-green); color: var(--app-green); background: #F3F9F5; }
.sd-chip.is-pop { transform: scale(1.05); }
.sd-chip .v { display: inline-block; transition: opacity .12s, transform .12s; }
.sd-chip .v.is-swap { opacity: 0; transform: translateY(-6px); }
.sd-label { margin-top: 24px; font-size: .9375rem; color: #6B776F; min-height: 1.5em; transition: opacity .3s; }
.sd-label strong { color: #0F1412; font-weight: 600; }
.sd-rows { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; min-height: 168px; }
.sd-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px;
  border: 1px solid #E3E6DE; border-radius: 12px;
  background: #fff;
  opacity: 0; transform: translateY(26px);
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.sd-row.is-in { opacity: 1; transform: none; }
.sd-mark { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 700; font-family: var(--font-app); }
.sd-row-body { flex: 1; min-width: 0; }
.sd-org { font-size: .875rem; font-weight: 600; color: #59665C; }
.sd-org span { color: var(--app-green); }
.sd-title { font-family: var(--font-app); font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); font-weight: 800; letter-spacing: -.01em; margin-top: 2px; color: #0F1412; }
.sd-meta { display: flex; flex-wrap: wrap; font-size: .875rem; color: #3E4A42; margin-top: 6px; }
.sd-meta span + span::before { content: '·'; margin: 0 8px; color: #B4BCB6; }
.sd-meta.sub { color: #6B776F; font-size: .8125rem; margin-top: 2px; }
.sd-save { color: #8A958C; flex-shrink: 0; }
.sd-save svg { width: 20px; height: 20px; }
.sd-sample { font-size: .75rem; font-weight: 700; color: #6B776F; border: 1px solid #E3E6DE; border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: 2px; }
/* The visitor's own search: an honest invitation instead of fake results. */
.sd-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 22px 22px 24px;
  border-radius: 20px;
  background: var(--ink-950);
  color: var(--mist-100);
}
.sd-cta p { font-size: 1rem; line-height: 1.5; max-width: 52ch; }
.sd-cta strong { color: var(--white); }
@media (max-width: 960px) {
  .sd-rows { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 640px) {
  .sd-frame { border-radius: 16px; }
  .sd-key .k-label { display: none; }
  .sd-chip { height: 38px; padding: 0 13px; font-size: .875rem; }
  .sd-row { padding: 14px; gap: 12px; }
  .sd-mark { width: 40px; height: 40px; font-size: 14px; border-radius: 9px; }
  .sd-save { display: none; }
  .sd-rows { min-height: 0; }
}

/* ==========================================================================
   4. Events  (ev-*)
   ========================================================================== */
.ev-panel {
  position: relative;
  background: #fff;
  color: #0F1412;
  border-radius: 18px;
  padding: 24px 24px 14px;
  font-family: var(--font-body);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .85);
}
.ev-sub { font-size: 13.5px; color: #59665C; margin-top: 4px; }
.ev-list { list-style: none; padding: 0; margin-top: 14px; }
.ev-item { display: flex; align-items: center; gap: 14px; padding: 14px 10px; margin: 0 -10px; border-radius: 10px; }
.ev-item + .ev-item { margin-top: 2px; }
.ev-item.is-discord { background: #F3F4FE; box-shadow: inset 0 0 0 1px #DCDFFB; }
.ev-date { width: 52px; flex-shrink: 0; text-align: center; border: 1px solid #E3E6DE; border-radius: 9px; overflow: hidden; background: #fff; }
.ev-date span { display: block; padding: 3px 0; background: #F5F6F1; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--app-green); }
.ev-date b { display: block; padding: 5px 0 6px; font-family: var(--font-app); font-size: 20px; font-weight: 800; }
.ev-cover { width: 52px; height: 52px; flex-shrink: 0; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15, 20, 18, .08); }
.ev-cover img { width: 100%; height: 100%; object-fit: cover; }
.ev-mid { flex: 1; min-width: 0; }
.ev-name { font-family: var(--font-app); font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.ev-facts { font-size: 13.5px; color: #59665C; margin-top: 2px; }
.ev-via { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5865F2; font-weight: 600; margin-top: 4px; }
.ev-via svg { width: 15px; height: 15px; }
.ev-act { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 700; background: var(--app-green); color: #fff; transition: background-color .15s; white-space: nowrap; }
.ev-act:hover { background: var(--app-green-hover); }
.ev-act.is-discord { background: var(--discord); }
.ev-act.is-discord:hover { background: #4752C4; }
@media (max-width: 520px) {
  .ev-panel { padding: 18px 14px 10px; border-radius: 16px; }
  .ev-item { flex-wrap: wrap; gap: 12px; }
  .ev-mid { flex-basis: calc(100% - 140px); }
  .ev-date { width: 44px; }
  .ev-date b { font-size: 17px; }
  .ev-cover { width: 44px; height: 44px; }
  .ev-act { margin-left: 112px; }
}
