/* ==========================================================================
   Portfolio Moguls — Insights
   Slim page header · Media row (YouTube facades) · Editorial (native posts)
   Mobile-first, per LESSON-009.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared kicker — the small letter-spaced line above a section heading
   -------------------------------------------------------------------------- */

.pm-kicker {
  font-family: var(--pm-font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pm-muted-cool);
  margin: 0;
}

/* --------------------------------------------------------------------------
   1 · Slim page header
   Compact by design: a band, not a hero. The page's content is the point.
   -------------------------------------------------------------------------- */

.pm-pagehead {
  background: var(--pm-navy);
  color: var(--pm-on-navy);
  border-bottom: var(--pm-rule-gold);
  padding-block: 44px 40px;
}

.pm-pagehead__h1 {
  font-family: var(--pm-font-ui);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

.pm-pagehead__sub {
  font-family: var(--pm-font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--pm-on-navy-soft);
  margin: 14px 0 0;
  max-width: 62ch;
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   2 · Media row
   -------------------------------------------------------------------------- */

.pm-media { padding-block: 56px; }

.pm-media__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.pm-media__heading { margin-top: 10px; }

.pm-media__intro {
  font-size: 14.5px;
  color: var(--pm-muted-cool);
  margin: 8px 0 0;
}

.pm-media__nav { display: flex; gap: 8px; }
.pm-media__nav[hidden] { display: none; }

/* Hairline arrows — outline only, so they read as controls rather than CTAs. */
.pm-media__arrow {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  color: var(--pm-navy);
  font-size: 22px;
  line-height: 1;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.pm-media__arrow:hover:not(:disabled),
.pm-media__arrow:focus-visible {
  background: var(--pm-navy);
  border-color: var(--pm-navy);
  color: var(--pm-white);
}

.pm-media__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.pm-media__row {
  list-style: none;
  margin: 0;
  padding: 0 0 6px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: var(--pm-space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* This row is the only thing on the page allowed to scroll sideways. */
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.pm-media__row::-webkit-scrollbar { display: none; }

.pm-media__empty {
  font-family: var(--pm-font-body);
  color: var(--pm-muted-cool);
  margin: 0;
}

/* ---- Video card ---------------------------------------------------------- */

.pm-vidcard {
  scroll-snap-align: start;
  /* Grid items default to min-width:auto, which would let a wide card set the
     row's min-content and push the page sideways. */
  min-width: 0;
}

.pm-vidcard__frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius-lg);
  background: var(--pm-stripe-cool);
  /* Reserved before the thumbnail loads, so the row never reflows. */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  box-shadow: 0 14px 32px -20px rgba(27, 42, 74, 0.5);
  cursor: pointer;
}

.pm-vidcard__frame:disabled { cursor: default; }

.pm-vidcard__frame:focus-visible {
  outline: 3px solid var(--pm-focus);
  outline-offset: 3px;
}

.pm-vidcard__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* The iframe the facade swaps in on click. */
.pm-vidcard__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.pm-vidcard__tag {
  position: absolute;
  inset: 10px auto auto 10px;
  background: var(--pm-navy);
  color: var(--pm-on-navy);
  font-family: var(--pm-font-ui);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: var(--pm-radius-sm);
}

.pm-vidcard__dur {
  position: absolute;
  inset: auto 10px 10px auto;
  background: rgba(27, 42, 74, 0.82);
  color: var(--pm-white);
  font: var(--pm-stamp-type);
  letter-spacing: var(--pm-stamp-tracking);
  padding: 4px 8px;
  border-radius: var(--pm-radius-sm);
}

.pm-vidcard__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pm-navy);
  color: var(--pm-white);
  /* Optically centres the triangle inside the disc. */
  padding-left: 3px;
  transition: background 200ms ease, color 200ms ease;
}

.pm-vidcard__frame:hover:not(:disabled) .pm-vidcard__play,
.pm-vidcard__frame:focus-visible .pm-vidcard__play {
  background: var(--pm-action);
  color: var(--pm-action-text);
}

.pm-vidcard__title {
  font-family: var(--pm-font-body);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: var(--pm-navy);
  margin: 14px 0 0;
  text-wrap: pretty;
}

.pm-vidcard__date {
  font: var(--pm-stamp-type);
  letter-spacing: var(--pm-stamp-tracking);
  text-transform: uppercase;
  color: var(--pm-stamp);
  margin: 7px 0 0;
}

/* --------------------------------------------------------------------------
   3 · Editorial
   -------------------------------------------------------------------------- */

.pm-desk { padding-block: 62px; }

.pm-desk__head { margin-bottom: 30px; }

.pm-desk__heading { margin-top: 10px; }

.pm-desk__intro {
  font-family: var(--pm-font-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--pm-text-soft);
  margin: 12px 0 0;
  max-width: 60ch;
}

.pm-desk__empty {
  font-family: var(--pm-font-body);
  color: var(--pm-muted-cool);
  margin: 0;
}

.pm-desk__grid {
  display: grid;
  gap: var(--pm-space-4);
  margin-top: var(--pm-space-4);
}

.pm-note {
  background: var(--pm-white);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--pm-shadow-card);
  transition: border-color 200ms ease;
}

.pm-note:hover { border-color: var(--pm-action); }

.pm-note--feature {
  background: var(--pm-white);
  padding: 28px 26px 26px;
  border-top: var(--pm-rule-accent);
}

.pm-note__chip {
  display: inline-block;
  background: var(--pm-navy);
  color: var(--pm-on-navy);
  font-family: var(--pm-font-ui);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: var(--pm-radius-sm);
}

.pm-note__title {
  font-family: var(--pm-font-body);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.26;
  margin: 14px 0 0;
  text-wrap: balance;
}

.pm-note__title a {
  color: var(--pm-navy);
  text-decoration: none;
}

.pm-note__title a:hover,
.pm-note__title a:focus-visible { color: var(--pm-link-hover); }

.pm-note--feature .pm-note__title { font-size: 25px; }

.pm-note__excerpt {
  font-family: var(--pm-font-ui);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--pm-muted-cool);
  margin: 10px 0 0;
}

/* The Oxford-style meta line. */
.pm-note__meta {
  font: var(--pm-stamp-type);
  letter-spacing: var(--pm-stamp-tracking);
  text-transform: uppercase;
  color: var(--pm-stamp);
  margin: 14px 0 0;
}

.pm-note__more { display: inline-block; margin-top: 16px; }

/* ---- Pagination — hairline, matching the Buy index -----------------------  */

.pm-desk__pagination { margin-top: var(--pm-space-6); }

.pm-desk__pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pm-desk__pagination .page-numbers a,
.pm-desk__pagination .page-numbers span {
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius-sm);
  font-family: var(--pm-font-ui);
  font-size: 14px;
  color: var(--pm-navy);
  text-decoration: none;
}

.pm-desk__pagination .page-numbers .current {
  background: var(--pm-navy);
  color: var(--pm-white);
  border-color: var(--pm-navy);
}

/* --------------------------------------------------------------------------
   4 · Single post — the minimal fallback
   -------------------------------------------------------------------------- */

.pm-wrap--article {
  max-width: 68ch;
  margin-inline: auto;
  padding-inline: var(--pm-gutter);
}

.pm-article { padding-bottom: 62px; }

.pm-article__head { padding-block: 44px 26px; }

.pm-article__title {
  font-family: var(--pm-font-body);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.18;
  color: var(--pm-navy);
  margin: 16px 0 0;
  text-wrap: balance;
}

.pm-article__meta {
  font: var(--pm-stamp-type);
  letter-spacing: var(--pm-stamp-tracking);
  text-transform: uppercase;
  color: var(--pm-stamp);
  margin: 14px 0 0;
}

.pm-article__body {
  font-family: var(--pm-font-body);
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--pm-text);
}

.pm-article__body > * + * { margin-top: 1.1em; }

.pm-article__body h2,
.pm-article__body h3 {
  font-family: var(--pm-font-ui);
  color: var(--pm-navy);
  margin-top: 1.8em;
}

.pm-article__body h2 { font-size: 24px; }
.pm-article__body h3 { font-size: 19px; }

.pm-article__body a { text-decoration: underline; text-underline-offset: 2px; }

.pm-article__body blockquote {
  margin-inline: 0;
  padding-left: 20px;
  border-left: var(--pm-rule-accent);
  font-style: italic;
  color: var(--pm-navy);
}

.pm-article__body img { border-radius: var(--pm-radius-lg); }

.pm-article__back { margin-top: var(--pm-space-7); }

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  .pm-media__row { grid-auto-columns: 46%; }
  .pm-desk__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .pm-pagehead { padding-block: 56px 52px; }
  .pm-pagehead__h1 { font-size: 42px; }
  .pm-media { padding-block: 72px; }
  .pm-desk { padding-block: 78px; }
  .pm-article__title { font-size: 40px; }
}

@media (min-width: 1024px) {
  .pm-media__row { grid-auto-columns: 31.5%; }
  .pm-note--feature .pm-note__title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-media__arrow,
  .pm-note,
  .pm-vidcard__play { transition: none; }
}
