/* TheStartupsHub | Product detail panel. V39.
   Used by startups.html and venture-hub.html. The panel is a <dialog>, so the
   browser handles focus trapping, Esc and the backdrop; nothing here reimplements
   those. On phones it docks to the bottom of the viewport and is swipe-scrollable,
   which is the one place a desktop centred modal reads badly.

   Variables come from shared.css. Anything not defined there is written out in
   full so this file can be dropped onto a page that does not load the theme. */

.pd-card { cursor: pointer; }
.pd-card:focus-visible {
  outline: 3px solid var(--saffron, #f48c06);
  outline-offset: 3px;
}

/* the "Listed by" byline on the card itself */
.p-by {
  display: flex; align-items: center; gap: 7px;
  font-size: .78rem; color: var(--ink-soft, #5b5750);
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--line, #e7e3db);
}
.p-by .p-by-av {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink, #23201c); color: #fff;
  font-size: .56rem; font-weight: 700; letter-spacing: .02em;
}
.p-by b { font-weight: 600; color: var(--ink, #23201c); }
.p-by .p-by-more { margin-left: auto; font-size: .76rem; color: var(--saffron-deep, #d97706); white-space: nowrap; }

/* ---- the panel ---- */
#pdDialog {
  border: 0; padding: 0; max-width: none; max-height: none;
  width: min(680px, calc(100vw - 32px));
  background: transparent; color: inherit;
  /* a dialog is centred by the UA; margin:auto keeps that under max-height */
  margin: auto;
}
#pdDialog::backdrop {
  background: rgba(20, 17, 14, .62);
  backdrop-filter: blur(3px);
}
.pd-shell {
  background: var(--white, #fff);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  overflow: hidden;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  animation: pdIn .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pdIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .pd-shell { animation: none; } }

.pd-head {
  position: relative;
  padding: 24px 56px 20px 24px;
  border-bottom: 1px solid var(--line, #e7e3db);
  display: flex; gap: 16px; align-items: flex-start;
}
.pd-head::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--accent, var(--saffron, #f48c06));
}
.pd-logo {
  flex: 0 0 auto; width: 54px; height: 54px; border-radius: 13px;
  object-fit: contain; background: var(--sand, #f7f6f2); padding: 7px;
}
.pd-logo.pd-initials {
  display: grid; place-items: center; padding: 0;
  color: #fff; font-family: 'Sora', system-ui, sans-serif;
  font-weight: 700; font-size: 1.15rem;
}
.pd-titles { min-width: 0; flex: 1; }
.pd-titles h2 {
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 1.32rem; font-weight: 700; line-height: 1.22; margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.pd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-soft, #5b5750); }
.pd-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
/* both pages give .p-badge margin-left:auto so it sits at the right edge of a
   card. In this row it is the first item, so that would push the whole row
   right. Two classes outrank the page's single-class rule. */
.pd-meta .p-badge { margin-left: 0; }

.pd-x {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line, #e7e3db); background: var(--white, #fff);
  font-size: 1.15rem; line-height: 1; color: var(--ink-soft, #5b5750);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.pd-x:hover { background: var(--ink, #23201c); color: #fff; border-color: var(--ink, #23201c); }
.pd-x:focus-visible { outline: 3px solid var(--saffron, #f48c06); outline-offset: 2px; }

.pd-body { padding: 22px 24px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pd-lede { font-size: .97rem; line-height: 1.62; color: var(--ink, #23201c); margin: 0 0 22px; }

.pd-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line, #e7e3db); border: 1px solid var(--line, #e7e3db); border-radius: 12px; overflow: hidden; }
.pd-dl > div { background: var(--white, #fff); padding: 13px 15px; }
.pd-dl dt { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft, #5b5750); margin: 0 0 5px; }
.pd-dl dd { margin: 0; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }

/* who listed it */
.pd-by {
  margin-top: 22px; padding: 16px;
  background: var(--sand, #f7f6f2);
  border: 1px solid var(--line, #e7e3db); border-radius: 12px;
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
}
.pd-by-av {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink, #23201c); color: #fff;
  font-family: 'Sora', system-ui, sans-serif; font-weight: 700; font-size: .78rem;
}
.pd-by-txt { min-width: 0; flex: 1 1 160px; }
.pd-by-txt span { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft, #5b5750); margin-bottom: 3px; }
.pd-by-txt b { font-size: .98rem; overflow-wrap: anywhere; }
.pd-by .btn { flex: 0 0 auto; }
.pd-by-hint { flex: 1 0 100%; font-size: .75rem; line-height: 1.5; color: var(--ink-soft, #5b5750); }

.pd-note { margin: 18px 0 0; font-size: .78rem; line-height: 1.6; color: var(--ink-soft, #5b5750); }
.pd-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

@media (max-width: 600px) {
  #pdDialog {
    width: 100%;
    margin: 0;
    /* dock to the bottom: a full-height sheet is easier to reach one-handed */
    position: fixed; inset: auto 0 0 0;
  }
  .pd-shell { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .pd-head { padding: 20px 50px 17px 20px; }
  .pd-logo { width: 46px; height: 46px; }
  .pd-titles h2 { font-size: 1.16rem; }
  .pd-body { padding: 18px 20px 26px; }
  .pd-dl { grid-template-columns: 1fr; }
  .pd-foot .btn, .pd-by .btn { width: 100%; text-align: center; }
}
