/* Resources app: news, events, articles and the documents library.
   Component styles only; the design system is static/css/site.css. Loaded through
   {% block extra_head %} on the resources pages. */

/* hairline grids that wrap over several rows (lists of twelve). Above the tablet
   breakpoint every card gets a bottom rule except the last row, which the grid's own
   border closes, and every card a right rule except the last column; site.css already
   handles the single-column layout below it. */
@media (width > 1220px) {
  .hair-grid.wrap > .hair-card { border-bottom: 1px solid var(--line); }
  .hair-grid.wrap > .hair-card:last-child { border-right: 1px solid var(--line); }
  .hair-grid.wrap.light > .hair-card { border-bottom-color: var(--line-light); }
  .hair-grid.wrap.light > .hair-card:last-child { border-right-color: var(--line-light); }
  .hair-grid.cols-2.wrap > .hair-card:nth-child(2n),
  .hair-grid.cols-3.wrap > .hair-card:nth-child(3n),
  .hair-grid.cols-4.wrap > .hair-card:nth-child(4n) { border-right: 0; }
  .hair-grid.cols-2.wrap > .hair-card:nth-child(2n+1):nth-last-child(-n+2),
  .hair-grid.cols-2.wrap > .hair-card:nth-child(2n+1):nth-last-child(-n+2) ~ .hair-card,
  .hair-grid.cols-3.wrap > .hair-card:nth-child(3n+1):nth-last-child(-n+3),
  .hair-grid.cols-3.wrap > .hair-card:nth-child(3n+1):nth-last-child(-n+3) ~ .hair-card,
  .hair-grid.cols-4.wrap > .hair-card:nth-child(4n+1):nth-last-child(-n+4),
  .hair-grid.cols-4.wrap > .hair-card:nth-child(4n+1):nth-last-child(-n+4) ~ .hair-card { border-bottom: 0; }
  /* a short last row stretches its last card over the empty cells, so no empty frame is
     left when the count is not a multiple of the column count (a card alone spans the row) */
  .hair-grid.cols-2.wrap > .hair-card:last-child:nth-child(2n+1),
  .hair-grid.cols-3.wrap > .hair-card:last-child:nth-child(3n+1),
  .hair-grid.cols-4.wrap > .hair-card:last-child:nth-child(4n+1) { grid-column: 1 / -1; }
  .hair-grid.cols-3.wrap > .hair-card:last-child:nth-child(3n+2),
  .hair-grid.cols-4.wrap > .hair-card:last-child:nth-child(4n+3) { grid-column: span 2; }
  .hair-grid.cols-4.wrap > .hair-card:last-child:nth-child(4n+2) { grid-column: span 3; }
  .hair-grid.cols-2.wrap > .hair-card:last-child:nth-child(2n+1),
  .hair-grid.cols-3.wrap > .hair-card:last-child:not(:nth-child(3n)),
  .hair-grid.cols-4.wrap > .hair-card:last-child:not(:nth-child(4n)) { border-right: 0; }
}
.res-grid.tight { margin-top: 44px; }

/* cards */
.res-card { min-height: 340px; color: inherit; transition: background .18s; }
.res-card:hover { background: #12141108; }
.hair-grid.light .res-card:hover { background: #ffffff0d; }
.res-card > .index { text-transform: uppercase; }
.res-card h3 { margin-top: 44px; }
.res-card h3.sm { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.08; }
.res-card > p { flex: none; }
.res-card .event-date { margin: 34px 0 10px; }
.res-card .event-date + h3 { margin-top: 0; }

/* section heads with a visible last-updated date */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 40px; }
.section-head .display { margin: 20px 0 0; }
.head-aside { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-bottom: 10px; }
.updated { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; line-height: 1.8; text-transform: uppercase; }
.updated time { color: var(--ink); }
.section-ink .updated, .section-ink-soft .updated { color: var(--white-60); }
.section-ink .updated time, .section-ink-soft .updated time { color: #fff; }
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; }
.list-head .display { margin: 20px 0 0; }
.list-links { display: flex; flex-wrap: wrap; gap: 28px; }
.notice.light { border-color: #ffffff3d; background: #ffffff0d; color: var(--white-70); }
.notice a { border-bottom: 1px solid currentColor; }

/* event dates */
.event-date { display: flex; flex-direction: column; margin: 0 0 24px; }
.event-date strong { font-size: clamp(36px, 3.4vw, 52px); font-weight: 400; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.event-date span { margin-top: 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hair-grid.light .event-date span { color: var(--white-70); }

/* detail aside */
.meta-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 22px; margin: 0; font-size: 14px; line-height: 1.55; }
.meta-list dt { padding-top: 2px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.meta-list dd { margin: 0; }
.meta-list .muted { color: var(--muted); font-size: 12px; }
.meta-list a { border-bottom: 1px solid var(--oxblood); color: var(--oxblood); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.tags li { padding: 4px 10px; border: 1px solid var(--line); color: var(--muted-dark); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.aside-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 30px; }
.aside-cta { margin: 30px 0 0; }
.aside-cta .button { width: 100%; }

/* documents */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0 30px; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.filter-bar a { display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px; padding: 16px 0; border-bottom: 2px solid transparent; color: var(--muted); transition: color .16s; }
.filter-bar a:hover { color: var(--ink); }
.filter-bar a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--oxblood); }
.filter-bar .count { color: var(--oxblood); font-variant-numeric: tabular-nums; }
.filter-bar + .list-head { margin-top: 34px; }
.doc-group { margin-top: 56px; }
.doc-group-title { margin: 0 0 6px; font-size: clamp(28px, 3vw, 42px); line-height: 1.02; letter-spacing: -.045em; }
.doc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.indent.doc-list { margin-top: clamp(60px, 8vw, 110px); }
.doc-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: start; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.doc-row .meta { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .16em; line-height: 1.5; text-transform: uppercase; }
.doc-row .meta time { color: var(--ink); }
.doc-row h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }
.doc-row .body p { max-width: 640px; color: var(--muted-dark); font-size: 15px; line-height: 1.65; }
.doc-row .body a { border-bottom: 1px solid var(--oxblood); color: var(--oxblood); }
.doc-row .action { justify-self: end; padding-top: 4px; }
.doc-row .action .text-link { white-space: nowrap; }
.doc-note { max-width: 640px; margin-top: 44px; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.pagination .pages { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pagination .pages a, .pagination .pages span { display: inline-block; min-width: 24px; padding: 6px 0; text-align: center; border-bottom: 2px solid transparent; }
.pagination .pages a:hover { color: var(--ink); }
.pagination .pages [aria-current="page"] { color: var(--ink); border-bottom-color: var(--oxblood); }

/* update cadence strip on the hub */
.cadence { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; padding-top: 34px; padding-bottom: 34px; background: var(--bone); border-top: 1px solid var(--line); }

/* right-to-left */
[dir="rtl"] .doc-row .action { justify-self: start; }
[dir="rtl"] .filter-bar a { margin-bottom: -1px; }

/* responsive */
@media (width <= 1220px) {
  .res-card { min-height: 0; }
  .res-card h3 { margin-top: 36px; }
  .head-aside { padding-bottom: 0; }
  .doc-row { grid-template-columns: 120px minmax(0, 1fr); }
  .doc-row .action { grid-column: 2; justify-self: start; padding-top: 0; }
}
@media (width <= 580px) {
  .doc-row { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .doc-row .meta { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .doc-row .action { grid-column: 1; }
  .filter-bar { gap: 0 20px; }
  .meta-list { grid-template-columns: 1fr; gap: 4px; }
  .meta-list dd { margin-bottom: 12px; }
  .cadence { flex-direction: column; align-items: flex-start; }
}
