/* ==========================================================================
   Engineering resources — hub page and the nine selection guides.

   The resources area previously borrowed .contact-path from the contact page,
   which is a five-across chip grid, so nine cards arrived cramped and the
   letter badges were carrying no information. This sheet gives the area its
   own rhythm: three-across cards with room to read, grouped checklists on the
   guide pages, and one accent used sparingly.

   Loaded after conversion.css and final-site-fixes.css, but before
   professional-polish.css and homepage-palette.css, which shared.js injects at
   runtime. Those two set card surface and the "Explore →" cue with
   !important, so this sheet works with them rather than against them — card
   grounds stay white, and layout is set here.
   ========================================================================== */

.resource-page,
body[data-page-type="product-family"] .resource-body {
  --rs-ink: #0f2238;
  --rs-ink-2: #33455a;
  --rs-muted: #5a6b7f;
  --rs-line: #e3e9f0;
  --rs-line-soft: #eef2f6;
  --rs-paper: #f6f8fa;
  --rs-accent: #c8420f;
  --rs-accent-soft: #fdf1ec;
}

/* --------------------------------------------------------------- hero ---- */

html body .resource-hero p {
  max-width: 66ch;
}

.rg-crumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font: 600 11.5px/1 var(--f-mono, 'JetBrains Mono', monospace);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rg-crumbs a {
  color: #ffb18d;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.rg-crumbs a:hover {
  border-bottom-color: currentColor;
}

.rg-crumbs span[aria-hidden] {
  color: rgba(255, 255, 255, .58);
}

.rg-crumbs > span:last-child {
  color: rgba(255, 255, 255, .62);
}

/* ------------------------------------------------------------ sections --- */

html body .resource-body {
  padding: 64px 0;
}

/* One tinted band between white ones keeps the page from reading as a
   single long list, without introducing a second accent. */
html body .resource-body.rs-band {
  background: var(--rs-paper);
  border-block: 1px solid var(--rs-line-soft);
}

html body .resource-body > .resource-shell > .resource-eyebrow {
  color: var(--rs-accent);
}

html body .resource-body > .resource-shell > h2 {
  margin: 0 0 12px;
  max-width: 22ch;
  color: var(--rs-ink);
  font-family: var(--f-head, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(23px, 2.5vw, 31px);
  line-height: 1.18;
  letter-spacing: -.02em;
  text-wrap: balance;
}

html body .resource-body > .resource-shell > p {
  margin: 0;
  max-width: 68ch;
  color: var(--rs-muted);
  font-size: 15px;
  line-height: 1.72;
}

/* --------------------------------------------------------- card grids ---- */

html body .resource-body .contact-path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

html body .resource-body a.contact-path {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border-radius: 12px;
  overflow: hidden;
}

/* A hairline that fills in on hover — the accent appears on approach rather
   than sitting on every card at rest. */
html body .resource-body a.contact-path::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rs-accent);
  opacity: 0;
  transition: opacity .18s ease;
}

html body .resource-body a.contact-path:hover::before {
  opacity: 1;
}

html body .resource-body a.contact-path .rg-tag {
  display: block;
  margin-bottom: 13px;
  color: var(--rs-accent);
  font: 700 9.5px/1.2 var(--f-mono, 'JetBrains Mono', monospace);
  letter-spacing: .15em;
  text-transform: uppercase;
}

html body .resource-body a.contact-path strong {
  margin-bottom: 8px;
  color: var(--rs-ink);
  font-family: var(--f-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -.01em;
}

html body .resource-body a.contact-path > span:not(.rg-tag) {
  color: var(--rs-muted);
  font-size: 13px;
  line-height: 1.62;
}

/* ------------------------------------------------ requirement form grid --- */

html body .resource-questionnaire-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

html body a.resource-questionnaire-card {
  min-height: 168px;
  padding: 22px 22px 20px;
  border-radius: 12px;
  border-color: var(--rs-line);
}

/* homepage-palette gives every direct span in this card the soft brand fill.
   Only the format badge should take it, so it is shaped into a pill and the
   action below is opted back out. */
html body a.resource-questionnaire-card > span {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--rs-accent);
  font-size: 9.5px;
  letter-spacing: .15em;
}

html body a.resource-questionnaire-card > span::before {
  content: "";
  width: 11px;
  height: 13px;
  flex: none;
  background: currentColor;
  /* a sheet with a folded corner, so the download reads before the label does */
  clip-path: polygon(0 0, 62% 0, 100% 32%, 100% 100%, 0 100%);
}

html body a.resource-questionnaire-card strong {
  margin: 14px 0 8px;
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -.01em;
}

/* professional-polish treats this <small> as the card action and paints it
   orange and bold. It is the description; the action is the element below. */
html body a.resource-questionnaire-card small.rq-desc {
  display: block !important;
  margin: 0 !important;
  padding-top: 0 !important;
  color: var(--rs-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.58 !important;
  transform: none !important;
}

/* professional-polish appends an arrow to that <small> for the same reason.
   The arrow belongs to the action, not to the description. */
html body a.resource-questionnaire-card small.rq-desc::after {
  content: none !important;
}

html body a.resource-questionnaire-card > span.resource-card-link {
  align-self: auto;
  margin-top: auto;
  margin-left: auto;
  padding: 15px 0 0;
  border-radius: 0;
  background: none !important;
  font: 800 12px/1 var(--f-body, Inter, sans-serif);
  letter-spacing: 0;
  text-transform: none;
}

html body a.resource-questionnaire-card > span.resource-card-link::before {
  content: none;
}

/* ------------------------------------------------- application support --- */

.rg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
}

html body .rg-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 30px;
  border: 1px solid var(--rs-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

html body .rg-support-grid > div {
  padding: 22px 24px;
  border-right: 1px solid var(--rs-line-soft);
}

html body .rg-support-grid > div:last-child {
  border-right: 0;
}

html body .rg-support-grid h3 {
  margin: 0 0 7px;
  color: var(--rs-ink);
  font-family: var(--f-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 15px;
  line-height: 1.3;
}

html body .rg-support-grid p {
  margin: 0;
  color: var(--rs-muted);
  font-size: 13px;
  line-height: 1.62;
}

/* ========================================================== guide pages === */

html body .resource-layout {
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 34px;
  align-items: start;
}

html body .resource-card {
  border-radius: 14px;
  border-color: var(--rs-line);
}

html body .rg-main {
  padding: 34px 36px 12px;
}

html body .rg-main > h2 {
  margin: 0 0 10px;
  color: var(--rs-ink);
  font-family: var(--f-head, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(21px, 2.2vw, 26px);
  letter-spacing: -.02em;
}

.rg-note {
  margin: 0 0 6px;
  max-width: 62ch;
  color: var(--rs-muted);
  font-size: 14px;
  line-height: 1.7;
}

.rg-group {
  padding: 26px 0;
  border-top: 1px solid var(--rs-line-soft);
}

.rg-group:first-of-type {
  border-top: 0;
  padding-top: 22px;
}

html body .rg-group h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 15px;
  color: var(--rs-ink);
  font-family: var(--f-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 15.5px;
  line-height: 1.3;
  letter-spacing: -.005em;
}

/* The numbering is real: the groups are worked through in order, because each
   one narrows what the next one can be. */
.rg-group__n {
  flex: none;
  color: var(--rs-accent);
  font: 700 11px/1 var(--f-mono, 'JetBrains Mono', monospace);
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}

html body .rg-group .resource-checklist {
  gap: 11px;
  padding-left: 25px;
}

html body .rg-group .resource-checklist li {
  grid-template-columns: 18px 1fr;
  gap: 11px;
  color: var(--rs-ink-2);
  font-size: 13.5px;
  line-height: 1.62;
}

html body .rg-group .resource-checklist li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: #c6d2de;
  place-self: start;
}

/* ---- aside ---- */

/* homepage-palette forces every .resource-card to a white ground with
   !important, so the panel states its own surface at the same weight. */
html body .rg-aside {
  padding: 26px 26px 24px;
  background: var(--rs-ink) !important;
  border-color: var(--rs-ink) !important;
  box-shadow: none !important;
}

html body .rg-aside:hover {
  border-color: var(--rs-ink) !important;
}

html body .rg-aside .resource-eyebrow {
  color: #ffb18d !important;
}

html body .rg-aside h2 {
  margin: 0 0 10px;
  color: #fff !important;
  font-family: var(--f-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.015em;
}

html body .rg-aside > p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .74) !important;
  font-size: 13.5px;
  line-height: 1.66;
}

html body .rg-aside .btn {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

html body .rg-aside .btn.btn-orange {
  background: var(--rs-accent) !important;
  border-color: var(--rs-accent) !important;
  color: #fff !important;
}

html body .rg-aside .btn.btn-outline {
  background: rgba(255, 255, 255, .07) !important;
  border: 1px solid rgba(255, 255, 255, .3) !important;
  color: #fff !important;
}

html body .rg-aside .btn.btn-outline:hover {
  background: rgba(255, 255, 255, .14);
}

html body .rg-aside .resource-meta {
  border-top-color: rgba(255, 255, 255, .16) !important;
  color: rgba(255, 255, 255, .6) !important;
  font-size: 11.5px;
}

/* ---- related guides ---- */

html body .rg-more {
  background: var(--rs-paper);
  border-top: 1px solid var(--rs-line-soft);
}

/* -------------------------------------------------------- responsive ----- */

@media (max-width: 1080px) {
  html body .resource-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 26px;
  }
}

@media (max-width: 980px) {
  html body .resource-body .contact-path-grid,
  html body .resource-questionnaire-grid,
  html body .rg-support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body .rg-support-grid > div:nth-child(2) {
    border-right: 0;
  }
  html body .rg-support-grid > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--rs-line-soft);
  }
  html body .resource-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  html body .rg-main {
    padding: 28px 26px 10px;
  }
}

@media (max-width: 680px) {
  html body .resource-body {
    padding: 46px 0;
  }
  html body .resource-body .contact-path-grid,
  html body .resource-questionnaire-grid,
  html body .rg-support-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  html body .rg-support-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--rs-line-soft);
  }
  html body .rg-support-grid > div:last-child {
    border-bottom: 0;
  }
  html body .rg-main {
    padding: 24px 20px 8px;
  }
  .rg-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  html body .rg-aside,
  html body .rg-more,
  html body .rg-crumbs {
    display: none !important;
  }
  html body .resource-layout {
    grid-template-columns: 1fr;
  }
  html body .rg-main {
    padding: 0;
    border: 0;
  }
}
