/* resources area — owned by the resources agent (29 Nov). Loaded after polish.css on every page.
   Pages: /resources/ hub, guides, glossary, datasheets, analyst reports, /news/, /news/events/, /services/security/, /accessibility/.
   Every rule is scoped by an id that exists only on those pages. Copy is untouched; resources.js only adds
   decorative icons/photos and moves one link. One spacing value between tiles: --gap. */

/* R1. Topic index — one form for "Datasheets by product family" and the Glossary "Browse by topic"
   (same as the hub's approved Browse by topic): lavender icon tile, title, one line below, thin rules.
   No numbered badges, no inline arrows, no boxes. Link rows get the arrow circle on the right. */
#datasheets-by-product-family .d-cards.d-cards,
main:has(#a-to-z) #browse-by-topic .d-feats.d-feats {
  display: grid !important; grid-template-columns: repeat(var(--rx-cols, 3), minmax(0, 1fr)) !important;
  gap: 0 var(--gap) !important; border: 0 !important; background: transparent !important; padding: 0 !important;
}
main:has(#a-to-z) #browse-by-topic .d-feats.d-feats { --rx-cols: 4; }
#datasheets-by-product-family .d-cards > .d-card.d-card,
main:has(#a-to-z) #browse-by-topic .d-feats > .d-feat.d-feat {
  position: relative; display: grid !important; grid-template-columns: 3.25rem minmax(0, 1fr) !important;
  grid-template-areas: "ico t" "ico p"; grid-template-rows: auto 1fr; column-gap: 1.25rem; row-gap: 0.375rem; align-content: start;
  padding: 1.75rem 0 !important; margin: -1px 0 0 !important; min-height: 0 !important;
  background: transparent !important; border: 0 !important; border-top: 1px solid var(--rule) !important; border-bottom: 1px solid var(--rule) !important;
  border-radius: 0 !important; box-shadow: none !important;
}
#datasheets-by-product-family .d-cards > .d-card.d-card { grid-template-columns: 3.25rem minmax(0, 1fr) 2.25rem !important; grid-template-areas: "ico t go" "ico p go"; }
.rx-ico { grid-area: ico; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 0.875rem;
  background: var(--indigo-10); border: 1px solid var(--indigo-20); color: var(--indigo); transition: background-color .2s linear, color .2s linear, border-color .2s linear; }
.rx-ico svg { width: 1.5rem; height: 1.5rem; }
#datasheets-by-product-family .d-card .d-card__badge { display: none !important; }
#datasheets-by-product-family .d-card .d-card__t,
main:has(#a-to-z) #browse-by-topic .d-feat .d-feat__lead {
  grid-area: t; align-self: end; margin: 0 !important; font-size: 1.25rem !important; line-height: 1.3 !important; color: var(--indigo) !important; font-weight: 600;
}
#datasheets-by-product-family .d-card .d-card__t a { color: inherit !important; text-decoration: none !important; }
#datasheets-by-product-family .d-card .d-card__t a::after { content: "" !important; position: absolute; inset: 0; margin: 0 !important; transform: none !important; }
#datasheets-by-product-family .d-card > p,
main:has(#a-to-z) #browse-by-topic .d-feat > p:not(.d-feat__lead) {
  grid-area: p; grid-column: auto !important; margin: 0 !important; max-width: 34rem; font-size: 1rem !important; line-height: 1.6 !important; color: var(--ink-2) !important;
}
/* arrow circle (decorative; the whole row is the title link) */
#datasheets-by-product-family .d-cards > .d-card::after {
  content: ""; grid-area: go; align-self: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--indigo-10) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D1D8F' stroke-width='1.75'%3E%3Cpath d='M4 12h15.5M13.5 6l6 6-6 6'/%3E%3C/svg%3E") center / 1rem no-repeat;
  transition: background-color .2s linear, transform .25s var(--ease-out);
}
#datasheets-by-product-family .d-cards > .d-card:hover::after { background-color: var(--turquoise); transform: translateX(3px); }
#datasheets-by-product-family .d-cards > .d-card:hover .rx-ico { background: var(--indigo); border-color: var(--indigo); color: #fff; }
#datasheets-by-product-family .d-cards > .d-card:hover .d-card__t { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
#datasheets-by-product-family .d-card .d-card__t a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; border-radius: 4px; }
/* the two actions sit one step below the index, left-aligned with it */
#datasheets-by-product-family .d-flow > .d-actions { margin-top: 2.5rem !important; gap: 1.5rem !important; align-items: center; }
@media (max-width: 68rem) {
  #datasheets-by-product-family .d-cards.d-cards, main:has(#a-to-z) #browse-by-topic .d-feats.d-feats { --rx-cols: 2; }
}
@media (max-width: 42rem) {
  #datasheets-by-product-family .d-cards.d-cards, main:has(#a-to-z) #browse-by-topic .d-feats.d-feats { --rx-cols: 1; }
  #datasheets-by-product-family .d-cards > .d-card.d-card, main:has(#a-to-z) #browse-by-topic .d-feats > .d-feat.d-feat { padding: 1.25rem 0 !important; column-gap: 1rem; }
}

/* R2. Guides by topic — two open photo features (a different form from the ruled "Latest" list below):
   photo, title with arrow circle, one line. No numbered badges, no box. */
#guides-by-topic .d-cards.d-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: var(--gap) !important; }
#guides-by-topic .d-cards > .d-card.d-card {
  position: relative; display: flex !important; flex-direction: column; gap: 0.625rem; padding: 0 !important; margin: 0 !important;
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; min-height: 0 !important;
}
#guides-by-topic .d-card .d-card__badge { display: none !important; }
.rx-cv { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-tile); overflow: hidden; background: var(--indigo-10); margin-bottom: 0.875rem; }
.rx-cv img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease-out); }
#guides-by-topic .d-card:hover .rx-cv img { transform: scale(1.04); }
#guides-by-topic .d-card .d-card__t { margin: 0 !important; font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem) !important; line-height: 1.3 !important; }
#guides-by-topic .d-card .d-card__t a { color: var(--indigo) !important; text-decoration: none !important; }
#guides-by-topic .d-card > p { grid-column: auto !important; margin: 0 !important; max-width: 36rem; font-size: 1.0625rem !important; line-height: 1.6 !important; color: var(--ink-2) !important; }
#guides-by-topic .d-card .d-card__t a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; border-radius: 4px; }
@media (max-width: 42rem) { #guides-by-topic .d-cards.d-cards { grid-template-columns: minmax(0, 1fr) !important; } }

/* R3. Glossary A to Z — read down each column (A→Z), term in its own narrow column, definition beside it. */
main:has(#a-to-z) #a-to-z .d-list--two.d-plist--check {
  display: block !important; columns: 2; column-gap: clamp(2rem, 4vw, 4rem) !important; column-rule: 0;
}
main:has(#a-to-z) #a-to-z .d-list--two.d-plist--check > li {
  display: grid !important; grid-template-columns: 5.75rem minmax(0, 1fr); column-gap: 1rem; align-items: baseline;
  break-inside: avoid; padding: 1.125rem 0 !important; font-size: 1rem; line-height: 1.6 !important; color: var(--ink-2);
}
main:has(#a-to-z) #a-to-z .rx-term { font-weight: 600; color: var(--indigo); font-size: 1.0625rem; }
main:has(#a-to-z) #a-to-z .d-list--two.d-plist--check > li > span { color: var(--graphite); }
@media (max-width: 48rem) {
  main:has(#a-to-z) #a-to-z .d-list--two.d-plist--check { columns: 1; }
  main:has(#a-to-z) #a-to-z .d-list--two.d-plist--check > li { grid-template-columns: minmax(0, 1fr); row-gap: 0.25rem; }
}

/* R4. Analyst reports — one ruled list: report title left, date + summary and the link right.
   "Request a demo" (moved by resources.js) sits once, under the list. */
main:has(#reports-h) #reports .d-units.d-units { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; border-bottom: 1px solid var(--rule); }
main:has(#reports-h) #reports .d-units > .d-unit.d-unit {
  display: grid !important; grid-template-columns: var(--w5, 40%) minmax(0, 1fr); column-gap: var(--gap); align-items: start;
  padding: 2rem 0 !important; border-top: 1px solid var(--rule) !important;
}
main:has(#reports-h) #reports .d-unit .d-unit__head h3 { margin: 0 !important; font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem) !important; color: var(--indigo); }
main:has(#reports-h) #reports .d-unit .d-unit__body { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
main:has(#reports-h) #reports .d-unit .d-p { margin: 0 !important; font-size: 1.0625rem; color: var(--graphite); }
main:has(#reports-h) #reports .d-unit .d-actions { margin: 0 !important; }
main:has(#reports-h) #reports .rx-after { margin-top: 2.5rem !important; padding-left: calc(var(--w5, 40%) + var(--gap)); }
@media (max-width: 62rem) {
  main:has(#reports-h) #reports .d-units > .d-unit.d-unit { grid-template-columns: minmax(0, 1fr); row-gap: 0.75rem; }
  main:has(#reports-h) #reports .rx-after { padding-left: 0; }
}

/* R5. News — the newest item as a wide feature (photo left, text right), the rest as open photo cards,
   four across. No white boxes; type as a plain label (no chip). */
#news ul.bento.nw { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: var(--gap) !important; white-space: normal; }
#news ul.bento.nw > li { grid-column: auto !important; }
body main #news .nw-item.rc.rc.rc.rc.rc {
  background: transparent !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; gap: 0.625rem;
}
body main #news .nw-item.rc.rc.rc.rc.rc > :not(.cv) { padding-inline: 0 !important; }
body main #news .nw-item.rc.rc.rc.rc.rc:hover { box-shadow: none !important; }
#news .nw-item .cv { aspect-ratio: 3 / 2; border-radius: var(--r-tile); margin-bottom: 0.5rem; }
#news .nw-item .tag { background: transparent !important; padding: 0 !important; color: var(--indigo) !important; font-size: 0.6875rem; letter-spacing: 0.1em; }
#news .nw-item .nw__meta time { font-size: 0.8125rem; color: var(--ink-2); }
#news .nw-item .nw__meta time::before { content: "·"; margin-right: 0.625rem; color: var(--ink-3); }
#news .nw-item h3, #news .nw-item h3 a { font-size: 1.0625rem !important; font-weight: 600; }
#news .nw-item:hover h3 a { color: var(--indigo) !important; }
#news .nw-item h3 a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }
@media (min-width: 62.01rem) {
  #news ul.bento.nw > li:first-child { grid-column: 1 / -1 !important; }
  body main #news ul.bento.nw > li:first-child.rc.rc.rc.rc.rc {
    display: grid !important; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "cv meta" "cv t";
    grid-template-rows: 1fr 1fr; column-gap: clamp(2rem, 4vw, 4rem); row-gap: 0.75rem; align-items: start;
  }
  #news ul.bento.nw > li:first-child .cv { grid-area: cv; aspect-ratio: 16 / 9; margin: 0; }
  #news ul.bento.nw > li:first-child .nw__meta { grid-area: meta; align-self: end; }
  #news ul.bento.nw > li:first-child h3 { grid-area: t; align-self: start; }
  #news ul.bento.nw > li:first-child h3, #news ul.bento.nw > li:first-child h3 a { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem) !important; line-height: 1.25 !important; color: var(--indigo) !important; }
}
@media (max-width: 62rem) { #news ul.bento.nw { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 36rem) {
  /* phone: the newest stays a photo card; the rest become a ruled list with thumbnails (as the library) */
  #news ul.bento.nw { grid-template-columns: minmax(0, 1fr) !important; row-gap: 0 !important; }
  body main #news ul.bento.nw > li:first-child.rc.rc.rc.rc.rc { padding-bottom: 1.5rem !important; border-bottom: 1px solid var(--rule) !important; }
  body main #news ul.bento.nw > li:not(:first-child).rc.rc.rc.rc.rc {
    display: grid !important; grid-template-columns: 6rem minmax(0, 1fr); grid-template-areas: "cv meta" "cv t";
    grid-template-rows: auto 1fr; column-gap: 1rem; row-gap: 0.25rem; align-items: start; padding: 1rem 0 !important; border-bottom: 1px solid var(--rule) !important;
  }
  #news ul.bento.nw > li:not(:first-child) .cv { grid-area: cv; aspect-ratio: 4 / 3; margin: 0; border-radius: var(--r-inner); }
  #news ul.bento.nw > li:not(:first-child) .nw__meta { grid-area: meta; }
  #news ul.bento.nw > li:not(:first-child) h3 { grid-area: t; margin: 0 !important; }
  #news ul.bento.nw > li:not(:first-child) h3, #news ul.bento.nw > li:not(:first-child) h3 a { font-size: 1rem !important; }
}

/* R6. Events — "Webinars" was a second indigo panel right before the indigo "Request a demo" band.
   Now an open split: a photo of an engineer-led session (resources.js) beside the statement, on the page. */
main:has(#webinars) #webinars > .wrap.rx-ev { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(2rem, 5vw, 5rem); align-items: center; }
main:has(#webinars) #webinars .d-statement.d-statement {
  background: transparent !important; color: var(--graphite); padding: 0 !important; border-radius: 0 !important; overflow: visible; gap: 1.25rem;
}
main:has(#webinars) #webinars .d-statement__pattern { display: none !important; }
main:has(#webinars) #webinars .d-statement__k { color: var(--indigo) !important; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; }
main:has(#webinars) #webinars .d-statement__big { color: var(--indigo) !important; font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.625rem) !important; line-height: 1.22 !important; max-width: 24ch; margin: 0; padding-top: 1.5rem; border-top: 2px solid var(--turquoise); }
.rx-ev__photo { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-tile); overflow: hidden; background: var(--indigo-10); }
.rx-ev__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; display: block; }
@media (max-width: 62rem) {
  main:has(#webinars) #webinars > .wrap.rx-ev { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }
  .rx-ev__photo { aspect-ratio: 16 / 10; }
}

/* R7. Accessibility — same form as Security's practices: one ruled set, icon + heading left, text right.
   (Was two lavender boxes of unequal content.) */
main:has(#known-limitations) .d-tiles:has(#known-limitations) { grid-template-columns: minmax(0, 1fr) !important; gap: 0 !important; }
main:has(#known-limitations) :is(#known-limitations, #feedback).d-tile {
  display: grid !important; grid-template-columns: var(--w5, 40%) minmax(0, 1fr) !important; column-gap: var(--gap) !important; align-items: start;
  background: transparent !important; border-radius: 0 !important; box-shadow: none !important; padding: 2.5rem 0 !important;
  border-top: 1px solid var(--rule) !important;
}
main:has(#known-limitations) #feedback.d-tile { border-bottom: 1px solid var(--rule) !important; }
main:has(#known-limitations) :is(#known-limitations, #feedback) > :is(.sc-ico, h2) { grid-column: 1; }
main:has(#known-limitations) :is(#known-limitations, #feedback) > p { grid-column: 2; grid-row: 1 / span 2; margin: 0 !important; font-size: 1.125rem !important; line-height: 1.7 !important; color: var(--graphite) !important; max-width: 40rem; }
main:has(#known-limitations) :is(#known-limitations, #feedback) h2 { font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.875rem) !important; color: var(--indigo) !important; margin: 0 !important; }
@media (max-width: 62rem) {
  main:has(#known-limitations) :is(#known-limitations, #feedback).d-tile { grid-template-columns: minmax(0, 1fr) !important; padding: 2rem 0 !important; }
  main:has(#known-limitations) :is(#known-limitations, #feedback) > p { grid-column: 1; grid-row: auto; margin-top: 1rem !important; }
}

/* R8. Security — Report a vulnerability: icon + heading left; the policy line and the two numbered steps
   together in the right column, top-aligned like the other two practices (no empty band above the steps). */
@media (min-width: 62.01rem) {
  main:has(#report-a-vulnerability) #report-a-vulnerability.d-sec > .wrap { display: grid; grid-template-columns: var(--w5, 40%) minmax(0, 1fr); column-gap: var(--gap); align-items: start; }
  main:has(#report-a-vulnerability) #report-a-vulnerability.d-sec > .wrap > .d-top { display: contents !important; }
  main:has(#report-a-vulnerability) #report-a-vulnerability.d-sec .d-top__h { grid-column: 1; grid-row: 1 / span 2; }
  main:has(#report-a-vulnerability) #report-a-vulnerability.d-sec .d-top__lede { grid-column: 2; grid-row: 1; margin: 0 !important; max-width: 40rem; }
  main:has(#report-a-vulnerability) #report-a-vulnerability.d-sec > .wrap > .d-flow { grid-column: 2; grid-row: 2; display: block !important; margin: 1.5rem 0 0 !important; padding: 0 !important; }
  main:has(#report-a-vulnerability) #report-a-vulnerability.d-sec .d-plist--check { margin: 0 !important; }
}

/* R9. Resources hub — Browse by type: 7 photo cards fill two full rows (4 + 3) instead of leaving an empty slot.
   Covers keep one height across both rows. */
@media (min-width: 68.01rem) {
  #browse-by-type .d-cards.d-cards { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  #browse-by-type .d-cards > .d-card { grid-column: span 3 !important; }
  #browse-by-type .d-cards > .d-card:nth-child(n+5 of .d-card) { grid-column: span 4 !important; }
  #browse-by-type .d-cards > .d-card:nth-child(n+5 of .d-card) .cv { aspect-ratio: 2 / 1; }
}
@media (max-width: 68rem) and (min-width: 36.01rem) {
  #browse-by-type .d-cards.d-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #browse-by-type .d-cards > .d-card:last-of-type { grid-column: 1 / -1 !important; }
  #browse-by-type .d-cards > .d-card:last-of-type .cv { aspect-ratio: 3 / 1; }
}

/* R10. Resources hub — Latest: the feature post is open like the list beside it (no white card), and the type
   reads as a plain label everywhere (no chips). */
body main .rs-posts > li .rc.rc.rc.rc.rc { background: transparent !important; box-shadow: none !important; }
body main .rs-posts > li:first-child .rc.rc.rc.rc.rc { padding: 0 !important; border-radius: 0 !important; gap: 0.625rem; }
body main .rs-posts > li:first-child .rc.rc.rc.rc.rc > :not(.cv) { padding-inline: 0 !important; }
.rs-posts .rs-post .cv { border-radius: var(--r-tile); }
.rs-posts > li:not(:first-child) .rs-post .cv { border-radius: var(--r-inner); }
.rs-posts .rs-post .tag.tag { background: transparent !important; padding: 0 !important; color: var(--indigo) !important; font-size: 0.6875rem; letter-spacing: 0.1em; }
.rs-posts .rs-post:hover .rs-post__t { color: var(--indigo) !important; }
.rs-posts .rs-post:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; }
@media (max-width: 62rem) {
  body main .rs-posts > li .rc.rc.rc.rc.rc { padding: 0 !important; border-radius: 0 !important; }
}

/* R11. Library filters (hub, datasheets, guides): the build hides filtered-out items with [data-off], but the
   ruled-list rule (display: grid !important) kept them visible, so the tabs did nothing. */
.lb-list > .lb-item.lr[data-off] { display: none !important; }
