/* resources.css — standalone layout for the /resources/ page only.
   Theming (light/dark tokens, the toggle button, global chrome) lives in styles.css;
   this file only styles page-specific structure and relies on those tokens. */

/* ---- Page head (mirrors .insights-head) ---- */
.collateral-head {
  padding: 90px 0 24px;
  position: relative;
  z-index: 2;
}

.collateral-head h1 {
  font-size: clamp(2.4rem, 2.4vw + 1.4rem, 3.4rem);
  margin: 0 0 14px;
  color: var(--text-strong);
}

.collateral-head p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 560px;
}

/* ---- Resource cards ---- */
.collateral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 24px 0 8px;
  position: relative;
  z-index: 2;
}

.collateral-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--hairline);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collateral-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.collateral-card-body {
  flex: 1;
}

/* Icon + kicker + freshness row */
.collateral-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(70, 60, 251, 0.1);
  color: var(--blue);
  flex-shrink: 0;
}

.collateral-kicker {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue);
  margin: 0;
}

.collateral-updated {
  margin: 0 0 0 auto;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.collateral-card h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--text-strong);
}

.collateral-dek {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* Actions: download control on the left, file-size metadata bottom-right on the
   same line. */
.collateral-card-actions {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.collateral-format {
  margin: 0 0 0 auto;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---- Progressive enhancement: single button (JS) vs. both links (no-JS) ---- */
.download-btn {
  display: none;
}

.js .download-btn {
  display: inline-block;
}

.variant-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 600;
}

.variant-links span {
  color: var(--text-muted);
  font-weight: 500;
}

.variant-links a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.js .variant-links {
  display: none;
}

/* ---- Latest insight — a card matching the resource cards, links to the post ---- */
.latest-insight {
  padding: 24px 0 0;
  position: relative;
  z-index: 2;
}

.latest-insight-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--hairline);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-insight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.latest-insight-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.latest-insight-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue);
}

.latest-insight-top time {
  margin: 0 0 0 auto;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

.latest-insight-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--text-strong);
}

.latest-insight-dek {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Secondary CTA — bordered panel matching the resource cards ---- */
.collateral-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 32px 0 96px;
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  box-shadow: var(--card-shadow);
  position: relative;
  z-index: 2;
}

.collateral-cta p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-strong);
}

.collateral-cta .primary {
  margin-left: auto;
}

@media (max-width: 600px) {
  .collateral-head {
    padding-top: 60px;
  }

  .collateral-cta .primary {
    margin-left: 0;
  }
}
