/* Stage 5 P1: PMESC Desk hub + format pages. Editorial, calm, fast.
   Uses the marketing theme's variables (tokens.css + marketing-theme.css +
   _astro/index css), and the Newsroom card styles from news.css. */

.desk-main { overflow-wrap: break-word; }

/* ---------- masthead ---------- */
.desk-masthead { background: var(--color-brand-strong); color: var(--warm-white); padding-block: var(--space-6) var(--space-6); }
.desk-masthead .pm-crumbs { color: var(--teal-100); margin-bottom: var(--space-3); }
.desk-masthead .pm-crumbs a { color: var(--warm-white); }
.desk-masthead .pm-eyebrow { color: var(--teal-100); }
.desk-masthead h1 { color: var(--warm-white); font-size: var(--fs-900); margin: 0 0 var(--space-2); letter-spacing: -0.02em; }
.desk-promise { font-size: var(--fs-500); color: var(--warm-white); max-width: 56ch; margin: 0 0 var(--space-4); opacity: .92; }
.desk-masthead-actions { display: flex; align-items: center; gap: var(--space-3); margin: 0; flex-wrap: wrap; }
.desk-masthead .desk-subscribe-link { background: var(--pm-gossip); border-color: var(--pm-gossip); color: var(--pm-navy); }
.desk-masthead .desk-subscribe-link:hover { background: var(--warm-white); border-color: var(--warm-white); }
.desk-rss { color: var(--warm-white); font-weight: 600; font-size: var(--fs-300); text-decoration: underline; text-underline-offset: 3px; }
.desk-masthead .wrap { position: relative; }
.desk-masthead-img { display: none; }
@media (min-width: 1100px) {
  .desk-masthead-img { display: block; position: absolute; right: var(--space-4, 1.5rem); top: 50%; transform: translateY(-50%); width: 300px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55); }
  .desk-masthead-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .desk-masthead:not(.desk-masthead--sub) { padding-block: 3.5rem; }
  .desk-masthead:not(.desk-masthead--sub) .wrap > :not(.desk-masthead-img) { max-width: calc(100% - 360px); }
}
.desk-masthead--sub h1 { font-size: var(--fs-800); }

/* ---------- filter bar ---------- */
.desk-filters { background: var(--color-surface); border-bottom: 1px solid var(--border-subtle); padding-block: var(--space-3); position: relative; }
.desk-filters-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.desk-dir { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.desk-dir a { padding: .45em 1.1em; border: 1.5px solid var(--border-strong); border-radius: 999px; text-decoration: none; color: var(--color-ink, var(--pm-navy)); font-weight: 600; font-size: var(--fs-300); min-height: 42px; display: inline-flex; align-items: center; background: var(--color-surface); }
.desk-dir a:hover { border-color: var(--color-secondary); color: var(--color-secondary); }
.desk-dir a[aria-current="true"] { background: var(--color-brand-strong); border-color: var(--color-brand-strong); color: var(--warm-white); }
.desk-filter-form { display: flex; align-items: flex-end; gap: var(--space-2); margin: 0; flex-wrap: wrap; }
.desk-filter-form .field { margin: 0; min-width: 13rem; }
.desk-filter-form label { font-size: var(--fs-200); font-weight: 700; color: var(--color-text-secondary); display: block; margin-bottom: .25rem; }
.desk-show { min-height: 44px; }

/* ---------- featured ---------- */
.desk-featured { padding-block: var(--space-5) var(--space-2); }
.desk-featured-kicker { font-size: var(--fs-200); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--color-secondary); margin: 0 0 var(--space-2); }
.desk-featured-card { display: grid; grid-template-columns: 1fr; gap: var(--space-4); background: var(--color-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; padding: 0; }
@media (min-width: 900px) { .desk-featured-card { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; } }
.desk-featured-media { display: block; background: linear-gradient(135deg, #123b5d, #2f5d8a); min-height: 200px; }
.desk-featured-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; display: block; }
.desk-featured-body { padding: 0 var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
@media (min-width: 900px) { .desk-featured-body { padding: var(--space-5); justify-content: center; } }
.desk-featured-body h2 { font-size: var(--fs-700); line-height: 1.15; margin: 0; }
.desk-featured-body h2 a { color: var(--color-brand-strong); text-decoration: none; }
.desk-featured-body h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.desk-featured-summary { color: var(--color-text-secondary); margin: 0; }
.desk-featured-link { font-weight: 700; }
.desk-featured--empty { padding-block: var(--space-5); }

/* ---------- rails ---------- */
.desk-rail { padding-block: var(--space-4); }
.desk-rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); border-top: 2px solid var(--color-brand-strong); padding-top: var(--space-3); }
.desk-rail-head h2 { font-size: var(--fs-600); margin: 0; color: var(--pm-navy); }
.desk-seeall { font-weight: 700; white-space: nowrap; }
.desk-rail-grid, .desk-format-grid { list-style: none; }
.desk-card-title { font-size: var(--fs-500); line-height: 1.25; margin: var(--space-1) 0; }
.desk-card p:last-child { color: var(--color-text-secondary); font-size: var(--fs-300); margin: 0; }
.desk-empty { color: var(--color-text-secondary); background: var(--color-surface-alt); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin: 0; }

/* ---------- format pages ---------- */
.desk-format-list { padding-block: var(--space-5); }
.desk-format-grid { margin: 0; padding: 0; }
.desk-pager { margin-top: var(--space-5); }

/* ---------- widget slots (tools / freight index / port calendar) ----------
   P8, P10 and P11 fill these partials; today they render nothing, so the
   block collapses to zero height and the hub never shows an empty box. */
.desk-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-4); margin-block: var(--space-3); }
.desk-widgets > * { min-width: 0; }

/* ---------- 375 px ---------- */
@media (max-width: 560px) {
  .desk-masthead { padding-block: var(--space-5); }
  .desk-filters-inner { align-items: stretch; }
  .desk-filter-form { width: 100%; }
  .desk-filter-form .field { flex: 1 1 100%; min-width: 0; }
  .desk-rail-head { align-items: center; }
}
