.resource-header { position: sticky; }
.resources-main { min-height: calc(100vh - 76px); padding: 72px 0 100px; }
.resources-inner { width: var(--container); margin: auto; }
.resources-heading { margin-bottom: 28px; }
.resources-heading .eyebrow { margin: 0 0 6px; color: var(--coral-dark); }
.resources-heading h1 { margin: 0; font-size: 2.8rem; line-height: 1.25; }
.resources-main [hidden] { display: none !important; }
.resource-tabs { display: flex; gap: 0; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--ink); border-radius: 5px; }
.resource-tabs button { flex: none; min-width: 132px; min-height: 48px; padding: 0 20px; border: 0; border-right: 1px solid var(--ink); background: transparent; font-weight: 700; cursor: pointer; }
.resource-tabs button:last-child { border-right: 0; }
.resource-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.theme-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.theme-options button { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 72px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; text-align: left; cursor: pointer; }
.theme-options button[aria-pressed="true"] { border-color: var(--blue); background: #edf8fc; box-shadow: inset 0 0 0 1px var(--blue); }
.theme-options img { width: 52px; height: 52px; flex: none; border-radius: 3px; object-fit: cover; }
.theme-options span { min-width: 0; font-size: 0.78rem; font-weight: 700; overflow-wrap: anywhere; }
.resource-status { min-height: 32px; margin: 22px 0 12px; color: var(--muted); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.resource-item { display: grid; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.resource-media { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.resource-media img, .resource-media video { width: 100%; height: 100%; object-fit: contain; }
.resource-media video { background: var(--ink); }
.resource-file-icon { display: grid; width: 100%; height: 100%; min-height: 160px; align-content: center; justify-items: center; gap: 10px; background: #eef5f7; color: #27667a; font-size: 0.8rem; font-weight: 800; }
.resource-file-icon svg { width: 54px; height: 54px; stroke-width: 1.5; }
.resource-file-icon.is-pdf { background: #fbefed; color: #aa4238; }
.resource-file-icon.is-word { background: #edf3fc; color: #305e9e; }
.resource-dialog .resource-file-icon { width: min(420px, 100%); min-height: min(420px, 55vh); border-radius: 5px; }
.resource-dialog .resource-file-icon svg { width: 76px; height: 76px; }
.resource-item strong { overflow: hidden; font-size: 0.98rem; text-overflow: ellipsis; white-space: nowrap; }
.resource-play { position: absolute; top: 50%; left: 50%; display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; background: rgba(23, 34, 45, 0.85); color: #fff; transform: translate(-50%, -50%); }
.resource-play svg { width: 22px; fill: currentColor; }
.resource-pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; color: var(--muted); font-size: 0.8rem; }
.resource-pagination > div { display: flex; gap: 8px; }
.resource-pagination button, .dialog-close { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; }
.resource-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.resource-pagination svg, .dialog-close svg { width: 18px; }
.resource-dialog { width: min(1000px, calc(100% - 30px)); max-height: 92vh; padding: 18px; border: 0; border-radius: 7px; background: #fff; }
.resource-dialog::backdrop { background: rgba(23, 34, 45, 0.8); }
.resource-dialog [data-dialog-content] { display: grid; max-height: calc(92vh - 100px); place-items: center; }
.resource-dialog img, .resource-dialog video { max-width: 100%; max-height: calc(92vh - 100px); }
.dialog-close { position: absolute; top: 24px; right: 24px; z-index: 1; }
.dialog-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 13px; }
.dialog-caption strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-caption a { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--blue-dark); font-weight: 700; }
.dialog-caption svg { width: 18px; }
@media (max-width: 760px) {
  .resource-header { display: flex; justify-content: space-between; padding: 12px 20px; }
  .resource-header .desktop-nav { display: none; }
  .resources-main { padding-top: 38px; }
  .resources-heading h1 { font-size: 2rem; }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .resource-tabs { width: 100%; }
  .resource-tabs button { flex: 1; min-width: 0; padding: 0 8px; font-size: 0.78rem; }
  .theme-options { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .theme-options::-webkit-scrollbar { display: none; }
  .theme-options button { flex: 0 0 155px; scroll-snap-align: start; }
}
@media (max-width: 480px) {
  .resource-grid { grid-template-columns: 1fr; }
  .resource-header .header-download { display: none; }
}
