/* Shared Byte Learning resources layout. */
.resource-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: 88px;
}
.resource-page:has(.bt-hero) { background: #e6f3ed; }
.tool-breadcrumb { display: flex; align-items: baseline; gap: .65rem; flex-wrap: wrap; padding-block: 22px; font-size: .9rem; color: #4e645e; }
.tool-breadcrumb a { color: #008375; font-weight: 800; }
#bt-app.bt {
  display: flex;
  flex: 1;
  flex-direction: column;
  max-width: var(--content-max, 1500px);
  margin: 0 auto;
  scroll-margin-top: 0;
  overflow-wrap: anywhere;
}
#bt-app .bt-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
#bt-app .bt-fade, .tool-followup { padding: clamp(24px, 5vw, 64px) 0; }
#bt-app .bt-fade {
  display: flex;
  flex: 1;
  flex-direction: column;
}
#bt-app .bt-fade:has(.bt-hero) { justify-content: center; }
#bt-app .bt-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: clamp(24px, 6vw, 84px); align-items: center; }
#bt-app .bt-hero h1 { font-size: clamp(2rem, 5.2vw, 4.75rem); text-wrap: balance; }
#bt-app .bt-hero .bt-lead { margin-top: 14px; font-size: clamp(1.05rem, 2vw, 1.23rem); }
#bt-app .bt-art { min-width: 0; padding: 0; }
#bt-app .bt-art img { width: 100%; height: auto; max-height: 520px; aspect-ratio: 3/2; object-fit: contain; scale: 1.2; }
#bt-app .bt-prog, #bt-app .bt-pager { max-width: none; }
#bt-app .bt-qhead { max-width: none; }
#bt-app .bt-svgbox svg { max-width: 480px; margin-inline: auto; }
#bt-app .bt-opts:not(.cols2):not(.cols3) { grid-template-columns: repeat(auto-fit,minmax(min(100%, 280px),1fr)); }
#bt-app .bt-btn { border-radius: 999px; }
.tool-followup { border-top: 1px solid #d1e5df; }
.tool-followup-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-top: 22px; }
.tool-followup-grid > section { background: #fff; border-radius: 22px; padding: clamp(16px, 4vw, 34px); }
.tool-followup-grid form { display: grid; gap: 13px; margin-top: 16px; }
.tool-followup-grid label { display: grid; gap: 5px; font-weight: 700; }
.tool-followup-grid label span { font-weight: 500; color: #4e645e; }
.tool-followup-grid input, .tool-followup-grid textarea { display: block; width: 100%; font: inherit; padding: 9px 12px; border: 1px solid #a5bfb5; border-radius: 12px; background: #fff; color: #123c36; }
.tool-followup-grid .bt-btn { justify-self: start; }
.resource-gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.resource-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); margin-top: 24px; }
.resource-tile { border: 1px solid #d9e5e1; border-radius: 24px; overflow: hidden; background: #fff; }
.resource-tile a { display: flex; flex-direction: column; height: 100%; }
.resource-tile a:focus-visible { outline-offset: -4px; }
.resource-art { background: var(--mint); display: grid; place-items: center; aspect-ratio: 3/2; overflow: hidden; }
.resource-art img { width: 100%; height: 100%; object-fit: contain; scale: 1.2; }
.resource-copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: clamp(14px, 1.5vw, 24px); }
.resource-copy h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.15; }
.resource-copy p { margin: 9px 0 14px; color: var(--muted); }
.resource-copy span { margin-top: auto; color: var(--teal); font-weight: 800; }
@media (max-width: 1000px) {
  .resource-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .resource-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  #bt-app .bt-hero, .tool-followup-grid { grid-template-columns: minmax(0,1fr); }
  #bt-app .bt-hero { gap: 24px; }
  #bt-app .bt-art img { max-height: 260px; }
  #bt-app .bt-fade:has(.bt-hero) { justify-content: flex-start; }
}
@media (max-width: 560px) {
  #bt-app .bt-opts.cols2, #bt-app .bt-opts.cols3 { grid-template-columns: minmax(0,1fr); }
  #bt-app .bt-btn { max-width: 100%; white-space: normal; }
}

[data-resource-library] .rtools { margin-top: 22px; }
[data-resource-library] .resource-list { margin-top: 0; }
[data-resource-library] [hidden] { display: none; }
[data-resource-empty] .btn { margin-top: 16px; }
