:root {
  --resources-nav-offset: var(--header-offset-desktop);
  --resources-nav-offset-mobile: var(--header-offset-mobile);
  --resources-dark-brown-6: color-mix(in srgb, var(--color-dark-brown) 6%, transparent);
  --resources-dark-brown-8: color-mix(in srgb, var(--color-dark-brown) 8%, transparent);
  --resources-dark-brown-12: color-mix(in srgb, var(--color-dark-brown) 12%, transparent);
  --resources-dark-brown-18: color-mix(in srgb, var(--color-dark-brown) 18%, transparent);
  --resources-dark-brown-28: color-mix(in srgb, var(--color-dark-brown) 28%, transparent);
  --resources-burgundy-72: color-mix(in srgb, var(--color-burgundy) 72%, transparent);
  --resources-white-90: color-mix(in srgb, var(--color-white) 90%, transparent);
}

body {
  min-height: 100vh;
  padding-top: var(--resources-nav-offset);
  background: var(--color-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

html.pending-resource-return {
  scroll-behavior: auto;
}

html.pending-resource-return body {
  opacity: 0;
}

.page-header {
  --hero-photo-image: url('../images/hero-photos/資源中心.png');
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 120px) clamp(20px, 5vw, 80px) clamp(40px, 6vw, 64px);
  background: var(--color-dark-brown);
  text-align: center;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

.page-header h1,
.page-header p {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  margin-bottom: var(--space-md);
  color: var(--color-text-inverse);
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: var(--leading-tight);
}

.section-verse {
  max-width: 40rem;
  margin: 0 auto;
  color: var(--resources-white-90);
  font-size: var(--font-body-sm);
  line-height: var(--leading-body);
}

.section-verse .verse-citation {
  display: block;
  margin-top: var(--space-sm);
  color: var(--color-warm-peach);
  font-weight: 700;
}

.resources-container,
.resource-detail-shell {
  width: min(100%, 1200px);
  margin: 0 auto;
}

.resources-section,
.resource-detail-section {
  padding: clamp(28px, 5vw, 40px) clamp(20px, 5vw, 80px) 0;
  background: var(--color-bg);
}

.resources-container {
  padding-bottom: clamp(72px, 8vw, 104px);
}

.resource-detail-section {
  padding-top: clamp(52px, 7vw, 72px);
  padding-bottom: clamp(88px, 10vw, 132px);
}

.results-info {
  color: var(--color-text-secondary);
}

.resource-status,
.resource-loading {
  color: var(--color-text-secondary);
  font-size: var(--font-body-sm);
  line-height: var(--leading-body);
}

.resource-status {
  min-height: 1.5rem;
  margin-top: var(--space-md);
}

.resource-loading {
  grid-column: 1 / -1;
  padding: var(--space-xl);
  text-align: center;
}

.results-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-md);
}

.results-info {
  margin: 0;
  color: var(--color-text-secondary);
}

.resource-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: nowrap;
  width: 100%;
}

.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
}

.resource-filter-groups {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 0;
}

.resource-filter-tabs {
  overflow-x: auto;
  margin-inline: -10px;
  padding: 3px 10px 12px;
}

.resource-filter-tabs--primary {
  flex: 1 1 auto;
}

.resource-filter-tabs--video {
  flex: 1 1 auto;
}

.resource-filter-tabs--video .filter-tab {
  --filter-fill: var(--color-sage-light);
  --rim-bright: rgba(255, 255, 255, 0.52);
  --rim-soft: rgba(255, 255, 255, 0.2);
  --rim-return: rgba(255, 255, 255, 0.4);
  --bevel-light: rgba(255, 255, 255, 0.2);
  --bevel-shade: rgba(71, 45, 48, 0.08);
  border-width: 1.25px;
  border-color: var(--rim-bright);
  background: var(--filter-fill);
  box-shadow:
    inset 0 1px 0 var(--bevel-light),
    inset 0 -1px 0 var(--bevel-shade);
  color: var(--color-text-primary);
}

.resource-filter-tabs--video .filter-tab::before {
  content: '';
  display: none;
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 1.25px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    var(--rim-bright),
    var(--rim-soft) 46%,
    var(--rim-return));
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.resource-filter-tabs--video .filter-tab.is-pointer-lit::before {
  background:
    radial-gradient(circle at var(--light-x) var(--light-y),
      rgba(255, 255, 255, 1) 0%,
      rgba(151, 233, 255, 0.58) 8%,
      rgba(198, 171, 255, 0.28) 15%,
      rgba(255, 255, 255, 0) 26%),
    linear-gradient(135deg,
      var(--rim-bright),
      var(--rim-soft) 46%,
      var(--rim-return));
}

.resource-filter-tabs--video .filter-tab:hover {
  border-color: var(--rim-bright);
  color: var(--color-coral);
}

.resource-filter-tabs--video .filter-tab.active {
  --filter-fill: var(--color-coral);
  --rim-bright: rgba(255, 255, 255, 0.68);
  --rim-soft: rgba(255, 255, 255, 0.28);
  --rim-return: rgba(255, 255, 255, 0.5);
  --bevel-light: rgba(255, 255, 255, 0.28);
  --bevel-shade: rgba(71, 45, 48, 0.12);
  border-color: var(--rim-bright);
  color: var(--color-white);
}

.resource-filter-tabs--video .filter-tab:focus-visible {
  outline: none;
  box-shadow:
    var(--shadow-focus),
    inset 0 1px 0 var(--bevel-light),
    inset 0 -1px 0 var(--bevel-shade);
}

@supports ((-webkit-mask: linear-gradient(#000 0 0)) and (-webkit-mask-composite: xor)) or
  ((mask: linear-gradient(#000 0 0)) and (mask-composite: exclude)) {
  .resource-filter-tabs--video .filter-tab,
  .resource-filter-tabs--video .filter-tab:hover,
  .resource-filter-tabs--video .filter-tab.active {
    border-color: transparent;
  }

  .resource-filter-tabs--video .filter-tab::before {
    display: block;
  }
}

.filter-tab {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--color-sage-light);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-body-sm);
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--duration-base) var(--ease-out-expo),
    border-color var(--duration-base) var(--ease-out-expo),
    color var(--duration-base) var(--ease-out-expo),
    transform 180ms var(--ease-out-expo),
    box-shadow 180ms var(--ease-out-expo);
}

.filter-tab::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow:
    0 2px 3px rgba(71, 45, 48, 0.22),
    0 7px 10px -4px rgba(71, 45, 48, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.filter-tab:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

.filter-tab.active {
  background: var(--color-coral);
  border-color: var(--color-coral);
  color: var(--color-white);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--color-coral) 22%, transparent);
}

.filter-tab:active {
  transform: translateY(0) scale(0.97);
}

.resource-filter-tabs--video .filter-tab.active {
  box-shadow:
    0 4px 10px color-mix(in srgb, var(--color-coral) 22%, transparent),
    inset 0 1px 0 var(--bevel-light),
    inset 0 -1px 0 var(--bevel-shade);
}

.resource-filter-tabs--video .filter-tab.active:focus-visible {
  box-shadow:
    var(--shadow-focus),
    0 4px 10px color-mix(in srgb, var(--color-coral) 22%, transparent),
    inset 0 1px 0 var(--bevel-light),
    inset 0 -1px 0 var(--bevel-shade);
}

.filter-tab:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

@media (hover: hover) and (pointer: fine) {
  .filter-tab:hover {
    transform: translateY(-2px);
  }

  .filter-tab:hover::after {
    opacity: 1;
  }
}

.resource-filter-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 0 0 auto;
  margin-left: auto;
}

.resource-filter-actions .sort-dropdown {
  flex: 0 0 auto;
}

.resource-filter-actions .search-bar {
  flex: 0 0 clamp(260px, 24vw, 340px);
  width: clamp(260px, 24vw, 340px);
  min-width: 260px;
}

.resource-filter-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-xs);
}

.resource-filter-trail[hidden] {
  display: none;
}

.resource-filter-trail-label {
  color: var(--color-text-secondary);
  font-size: var(--font-body-sm);
}

.resource-filter-token,
.resource-filter-clear {
  min-height: 44px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--font-body-sm);
  font-weight: 600;
  cursor: pointer;
}

.resource-filter-token {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--resources-dark-brown-18);
  background: var(--color-white);
  color: var(--color-text-primary);
  transition:
    border-color var(--duration-base) var(--ease-out-expo),
    color var(--duration-base) var(--ease-out-expo),
    transform var(--duration-base) var(--ease-out-expo);
}

.resource-filter-token:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

.resource-filter-clear {
  padding: 0.6rem 0.25rem;
  border: 0;
  background: transparent;
  color: var(--color-coral);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.resource-filter-token:focus-visible,
.resource-filter-clear:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: stretch;
}

.section-carousel--resources {
  --shared-carousel-gap: var(--space-lg);
  --shared-carousel-item-width: min(82vw, 360px);
}

.section-carousel--resources.is-carousel-active .resources-grid {
  display: flex;
  gap: var(--shared-carousel-gap);
  max-width: none;
}

.section-carousel--resources.is-carousel-active .resource-card {
  flex: 0 0 var(--shared-carousel-item-width);
}

.catalog-more {
  margin-top: var(--space-xl);
  text-align: center;
}

.catalog-more[hidden] {
  display: none;
}

.catalog-more-btn {
  min-height: 44px;
}

.resource-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--resources-dark-brown-6);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition:
    transform var(--duration-base) var(--ease-out-expo),
    box-shadow var(--duration-base) var(--ease-out-expo),
    border-color var(--duration-base) var(--ease-out-expo);
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--resources-dark-brown-12);
}

.resource-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8.5;
  background: var(--color-sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo);
}

.resource-card:hover .resource-thumbnail img {
  transform: scale(1.03);
}

.resource-thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-secondary);
  font-size: 3rem;
  opacity: 0.55;
}

.resource-type-badge,
.resource-type-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  width: fit-content;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--resources-dark-brown-12);
  border-radius: var(--radius-pill);
  background: var(--color-sage-light);
  color: var(--color-text-secondary);
  box-shadow: 0 6px 16px var(--resources-dark-brown-6);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.resource-type-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 1;
}

.resource-type-badge.article,
.resource-type-label.article {
  background: var(--color-sage-light);
  color: var(--color-text-secondary);
  border-color: color-mix(in srgb, var(--color-sage) 72%, var(--color-dark-brown));
}

.resource-type-badge.video,
.resource-type-label.video {
  background: var(--color-peach-light);
  color: var(--color-text-secondary);
  border-color: color-mix(in srgb, var(--color-warm-peach) 72%, var(--color-dark-brown));
}

.resource-type-badge.devotional,
.resource-type-label.devotional {
  background: color-mix(in srgb, var(--color-white) 72%, var(--color-warm-peach));
  color: var(--color-text-secondary);
  border-color: color-mix(in srgb, var(--color-coral) 36%, var(--color-dark-brown));
}

.resource-type-badge.leaflet,
.resource-type-label.leaflet {
  background: var(--color-coral-light);
  color: var(--color-text-secondary);
  border-color: color-mix(in srgb, var(--color-coral) 48%, var(--color-dark-brown));
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--resources-white-90);
  color: var(--color-coral);
  box-shadow: var(--shadow-card);
  font-size: 1.35rem;
  transition:
    transform var(--duration-base) var(--ease-out-expo),
    box-shadow var(--duration-base) var(--ease-out-expo);
}

.resource-card:hover .video-play-icon {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow: var(--shadow-card-hover);
}

.resource-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.resource-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: var(--font-h3);
  line-height: var(--leading-tight);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-intro {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--resources-dark-brown-8);
}

.resource-date {
  color: var(--color-text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.72;
}

.resource-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-coral);
  font-size: var(--font-sm);
  font-weight: 600;
  transition: gap var(--duration-base) var(--ease-out-expo);
}

.resource-card:hover .resource-cta {
  gap: var(--space-sm);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  margin-bottom: var(--space-lg);
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--color-sage);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-body-sm);
  font-weight: 600;
  line-height: 1;
  transition:
    background-color var(--duration-base) var(--ease-out-expo),
    color var(--duration-base) var(--ease-out-expo),
    border-color var(--duration-base) var(--ease-out-expo),
    transform var(--duration-base) var(--ease-out-expo);
}

.btn-back:hover {
  background: var(--color-coral-light);
  color: var(--color-text-primary);
  border-color: var(--color-coral);
  transform: translateX(-2px);
}

.btn-back:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.resource-detail-container {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  gap: var(--space-2xl);
  align-items: start;
}

.resource-main,
.resource-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

.resource-main.resource-detail-enter,
.resource-sidebar.resource-detail-enter {
  animation: resource-detail-enter 280ms var(--ease-out-expo) both;
}

.resource-sidebar.resource-detail-enter--delayed {
  animation-delay: 40ms;
}

@keyframes resource-detail-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resource-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.resource-detail-title {
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 1.5rem + 1.5vw, 2.6rem);
  line-height: var(--leading-tight);
  overflow-wrap: anywhere;
}

.resource-detail-date {
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
}

.video-embed-section,
.resource-detail-image,
.resource-description,
.action-card,
.details-card {
  border: 1px solid var(--resources-dark-brown-6);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
}

.video-embed-section,
.resource-detail-image {
  overflow: hidden;
}

.video-embed-wrapper {
  position: relative;
  height: 0;
  overflow: hidden;
  padding-bottom: 56.25%;
}

.video-embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.resource-detail-image {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sage-light);
}

.resource-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-detail-image-placeholder {
  color: var(--color-text-secondary);
  font-size: clamp(3.5rem, 7vw, 5rem);
  opacity: 0.55;
}

.resource-description {
  padding: clamp(24px, 4vw, 40px);
}

.resource-description h3 {
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: var(--font-h3);
  line-height: var(--leading-tight);
}

.resource-description p,
.resource-description ul,
.resource-description ol {
  color: var(--color-text-secondary);
  font-size: var(--font-body-sm);
  line-height: var(--leading-body);
}

.resource-description p + p,
.resource-description p + ul,
.resource-description p + ol,
.resource-description ul + p,
.resource-description ol + p,
.resource-description ul + ul,
.resource-description ol + ol {
  margin-top: var(--space-md);
}

.resource-description ul,
.resource-description ol {
  padding-left: 1.35rem;
}

.resource-description li + li {
  margin-top: var(--space-xs);
}

.resource-description--article {
  padding: clamp(28px, 4vw, 44px);
}

.resource-description--article h3 {
  margin-bottom: var(--space-lg);
}

.resource-article {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.article-lead {
  margin: 0;
  color: var(--color-text-primary);
  font-size: clamp(1.03rem, 0.98rem + 0.28vw, 1.16rem);
  line-height: var(--leading-relaxed);
}

.article-scripture,
.article-prayer-box {
  padding: var(--space-lg);
  border: 1px solid var(--resources-dark-brown-8);
  border-radius: var(--radius-sm);
}

.article-scripture {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border-left: 4px solid var(--color-coral);
  background: var(--color-sage-light);
}

.article-scripture p,
.article-prayer-box p {
  margin: 0;
}

.article-scripture p {
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 0.96rem + 0.22vw, 1.1rem);
  line-height: var(--leading-relaxed);
}

.article-scripture span {
  color: var(--color-text-secondary);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--resources-dark-brown-8);
}

.article-section h4,
.article-prayer-box h4 {
  margin: 0;
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.02rem + 0.3vw, 1.3rem);
  line-height: var(--leading-tight);
}

.article-prayer-box {
  background: var(--color-coral-light);
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: clamp(24px, 4vw, 32px);
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.action-card-price {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--resources-dark-brown-8);
}

.price-amount {
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.25rem);
  line-height: 1.1;
}

.price-note {
  margin-top: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: var(--font-xs);
  line-height: 1.5;
}

.action-card-kicker {
  color: var(--color-text-secondary);
  font-size: var(--font-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.action-card-heading {
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: var(--font-h3);
  line-height: var(--leading-tight);
}

.action-card-note {
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

.action-card-media {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--color-sage-light);
  color: var(--color-coral);
  font-size: 1.5rem;
}

.action-card .btn-primary,
.action-card .btn-secondary {
  width: 100%;
}

/* Print section wraps its note + button in .action-print (outside the card's gap),
   so add breathing room between the note and the Print button. */
.action-print .btn-secondary {
  margin-top: var(--space-md);
}

.registration-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.registration-form label {
  color: var(--color-text-primary);
  font-size: var(--font-xs);
  font-weight: 600;
}

.registration-form input {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--color-sage);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-body-sm);
  line-height: 1.5;
}

.registration-form input::placeholder {
  color: color-mix(in srgb, var(--color-text-secondary) 78%, transparent);
}

.registration-form input:focus,
.registration-form input:focus-visible {
  outline: none;
  border-color: var(--color-coral);
  box-shadow: var(--shadow-focus);
}

.email-register-feedback-slot:empty,
.share-feedback-slot:empty {
  display: none;
}

.registration-form .feedback-inline,
.share-feedback-slot .feedback-inline {
  white-space: pre-line;
}

.details-card {
  padding: clamp(20px, 4vw, 28px);
}

.details-card h4 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--resources-dark-brown-8);
  color: var(--color-text-primary);
  font-family: var(--font-serif);
  font-size: var(--font-h3);
  line-height: var(--leading-tight);
}

.details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.details-list li {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: var(--space-md);
  align-items: start;
}

.details-list .label {
  color: var(--color-text-secondary);
  font-size: var(--font-sm);
}

.details-list .value {
  color: var(--color-text-primary);
  font-size: var(--font-sm);
  font-weight: 600;
  text-align: right;
}

.share-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--resources-dark-brown-8);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--resources-dark-brown-18);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--font-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--duration-base) var(--ease-out-expo),
    border-color var(--duration-base) var(--ease-out-expo),
    color var(--duration-base) var(--ease-out-expo);
}

.share-btn:hover {
  background: var(--color-coral-light);
  border-color: var(--color-coral);
}

.share-btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.hidden {
  display: none !important;
}

@media (max-width: 1023px) {
  .resources-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-carousel--resources {
    --shared-carousel-item-width: min(72vw, 340px);
  }

  .resource-detail-container {
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  }
}

@media (max-width: 767px) {
  body {
    padding-top: var(--resources-nav-offset-mobile);
  }

  .page-header {
    padding: 56px 20px 32px;
  }

  .resource-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    flex-direction: row;
    min-height: 144px;
  }

  .resource-thumbnail {
    flex: 0 0 42%;
    aspect-ratio: auto;
  }

  .resource-content {
    padding: 0.75rem;
  }

  .resource-meta {
    padding-top: 0;
    border-top: 0;
  }

  .section-carousel--resources {
    --shared-carousel-item-width: 84vw;
  }

  .resource-filter-actions {
    flex-wrap: wrap;
  }

  .resource-filter-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .resource-filter-actions {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .resource-filter-actions .sort-dropdown,
  .resource-filter-actions .search-bar {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .resource-filter-trail {
    align-items: flex-start;
  }

  .resource-filter-trail-label {
    flex: 1 0 100%;
  }

  .resource-detail-container {
    grid-template-columns: 1fr;
  }

  .resource-detail-section {
    padding-top: 40px;
  }

  .share-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .resources-section,
  .resource-detail-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .resource-content,
  .action-card,
  .resource-description,
  .details-card {
    padding: var(--space-md);
  }
}

@media (max-width: 430px) {
  body {
    padding-top: var(--resources-nav-offset-mobile);
  }

  .resource-detail-section {
    padding-top: 32px;
  }

  .action-card .btn-primary,
  .action-card .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media print {
  @page {
    margin: 16mm;
  }

  body {
    padding-top: 0;
    background: var(--color-white);
  }

  .nav,
  .footer,
  .btn-back,
  .resource-sidebar,
  .modal-overlay,
  .no-print {
    display: none !important;
  }

  .resources-section,
  .resource-detail-section {
    padding: 0;
  }

  .resource-detail-shell,
  .resource-detail-container,
  .resource-main {
    width: 100%;
    display: block;
  }

  .resource-header,
  .resource-description,
  .video-embed-section,
  .resource-detail-image {
    border: none;
    box-shadow: none;
  }

  .resource-description {
    padding: 0;
  }

  .resource-detail-title {
    font-size: 24pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resource-card,
  .resource-card img,
  .video-play-icon,
  .resource-cta,
  .btn-back,
  .share-btn,
  .filter-tab,
  .filter-tab::after,
  .resource-filter-token,
  .results-count,
  .resource-main.resource-detail-enter,
  .resource-sidebar.resource-detail-enter {
    transition: none;
  }

  .resource-main.resource-detail-enter,
  .resource-sidebar.resource-detail-enter {
    animation: none;
  }

  .results-count.is-updating {
    animation: none;
  }

  .resource-card:hover,
  .btn-back:hover,
  .filter-tab:hover,
  .filter-tab:active,
  .filter-tab.active {
    transform: none;
  }
}

@keyframes resource-result-count-pulse {
  50% {
    color: var(--color-coral);
    text-shadow: 0 0 12px color-mix(in srgb, var(--color-coral) 40%, transparent);
  }
}

.results-count.is-updating {
  animation: resource-result-count-pulse 360ms ease-out 1;
}
