/* ================================================================
   BYR — Resources Page Styles (Combined Research & Resources)
   ================================================================
   Layout, TOC, accordion, callout, crosslink, closing-cta,
   divider, prose, fade-in, buttons → all from shared components.
   This file only contains page-specific styles.

   Depends: 01-core-tokens-base.css, 10-shared-page-components.css
   ================================================================ */

/* ── Homepage-style serif headings in two-col context ── */
.byr-two-col-main .byr-heading-serif {
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

/* ── Section spacing + scroll offset ── */
.byr-res-section { margin-bottom: 3.5rem; }
.byr-res-section[id] { scroll-margin-top: 6.5rem; }
.admin-bar .byr-res-section[id] { scroll-margin-top: calc(6.5rem + 32px); }

/* ── Focus-visible overrides ── */
.byr-res-support-card:focus-visible { outline: 3px solid var(--color-accent-primary); outline-offset: 3px; }
.byr-res-tool-link:focus-visible { outline: 3px solid var(--color-accent-primary); outline-offset: 3px; border-radius: 4px; }


/* ============================================================
   SUPPORT / ORG CARDS — Frosted glass + emerald glow (default)
   Used for community orgs and (with --cyan modifier) research orgs
   ============================================================ */
.byr-res-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.byr-res-support-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.55));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.4s ease;
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}

.byr-res-support-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,
    rgba(16, 185, 129, 0.04) 0%,
    rgba(52, 211, 153, 0.03) 40%,
    rgba(34, 211, 238, 0.02) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.byr-res-support-card > * { position: relative; z-index: 1; }

.byr-res-support-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.40);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(16, 185, 129, 0.10),
              0 0 50px rgba(16, 185, 129, 0.05),
              inset 0 1px 0 rgba(16, 185, 129, 0.06);
  text-decoration: none;
  color: inherit;
}

.byr-res-card-icon { font-size: 1.5rem; line-height: 1; }
.byr-res-card-title { font-size: var(--text-md); font-weight: 700; color: var(--color-heading); margin: 0; }
.byr-res-card-desc { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: var(--leading-relaxed); margin: 0; flex: 1; }
.byr-res-card-link { font-size: var(--text-sm); font-weight: 600; color: var(--color-accent-secondary); margin-top: 0.35rem; }

/* ── Cyan variant for research-focused org cards ── */
.byr-res-support-card--cyan::before {
  background: linear-gradient(160deg,
    rgba(34, 211, 238, 0.04) 0%,
    rgba(96, 165, 250, 0.03) 40%,
    rgba(168, 85, 247, 0.02) 70%,
    transparent 100%
  );
}

.byr-res-support-card--cyan:hover {
  border-color: rgba(34, 211, 238, 0.40);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(34, 211, 238, 0.10),
              0 0 50px rgba(34, 211, 238, 0.05),
              inset 0 1px 0 rgba(34, 211, 238, 0.06);
}

.byr-res-support-card--cyan .byr-res-card-link {
  color: var(--color-accent-primary);
}


/* ============================================================
   TOOL CARDS — Frosted glass + cyan glow
   ============================================================ */
.byr-res-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.byr-res-tool-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.55));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.4s ease;
}

.byr-res-tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,
    rgba(34, 211, 238, 0.04) 0%,
    rgba(96, 165, 250, 0.03) 40%,
    rgba(168, 85, 247, 0.02) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.byr-res-tool-card > * { position: relative; z-index: 1; }

.byr-res-tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.40);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(34, 211, 238, 0.10),
              0 0 50px rgba(34, 211, 238, 0.05),
              inset 0 1px 0 rgba(34, 211, 238, 0.06);
}

.byr-res-tool-name { font-size: var(--text-md); font-weight: 700; color: var(--color-heading); margin: 0; }

.byr-res-tool-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-lg);
  background: rgba(34, 211, 238, 0.1);
  color: var(--color-accent-primary);
  border: 1px solid rgba(34, 211, 238, 0.22);
  width: fit-content;
}

.byr-res-tool-desc { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: var(--leading-relaxed); margin: 0; flex: 1; }

.byr-res-tool-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent-primary);
  text-decoration: none;
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.byr-res-tool-link:hover { color: var(--color-accent-secondary); }


/* ============================================================
   CONDITION CARDS — Transparent container, frosted text areas
   Deep dive into FOP, NGLY1, NPC
   ============================================================ */
.byr-condition-grid { display: flex; flex-direction: column; gap: 2rem; margin: 2rem 0; }

.byr-condition-card {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.4s ease;
}

.byr-condition-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* Coloured top border */
.byr-condition-card--red    { border-top: 3px solid rgba(239, 68, 68, 0.70); }
.byr-condition-card--violet { border-top: 3px solid rgba(167, 139, 250, 0.70); }
.byr-condition-card--amber  { border-top: 3px solid rgba(251, 191, 36, 0.70); }

/* Per-card glow on hover */
.byr-condition-card--red:hover {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(239, 68, 68, 0.08),
              0 0 50px rgba(239, 68, 68, 0.04);
}
.byr-condition-card--violet:hover {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(167, 139, 250, 0.08),
              0 0 50px rgba(167, 139, 250, 0.04);
}
.byr-condition-card--amber:hover {
  border-color: rgba(251, 191, 36, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(251, 191, 36, 0.08),
              0 0 50px rgba(251, 191, 36, 0.04);
}

/* Frosted text panels */
.byr-condition-header {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.70), rgba(30, 41, 59, 0.50));
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}
.byr-condition-body {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.65), rgba(30, 41, 59, 0.45));
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

.byr-condition-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.byr-condition-name { font-size: clamp(1.1rem, 2vw, 1.25rem) !important; font-weight: 800; color: var(--color-heading); margin: 0 !important; line-height: 1.3; }
.byr-condition-gene { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .18rem .6rem; border-radius: 20px; background: rgba(255, 255, 255, .04); border: 1px solid var(--color-border-subtle); color: var(--color-text-muted); white-space: nowrap; font-family: 'Courier New', monospace; flex-shrink: 0; }
.byr-condition-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.byr-condition-count { font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.byr-condition-count--red { color: #ef4444; }
.byr-condition-count--violet { color: #a78bfa; }
.byr-condition-count--amber { color: #FBB924; }
.byr-condition-type { font-size: .68rem; color: var(--color-text-muted); letter-spacing: .03em; }
.byr-condition-type::before { content: '\b7'; margin-right: .5rem; opacity: .4; }
.byr-condition-body h4 { font-size: var(--text-sm); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .6rem 0; line-height: 1.3; }
.byr-condition-card--red .byr-condition-body h4 { color: #ef4444; }
.byr-condition-card--violet .byr-condition-body h4 { color: #a78bfa; }
.byr-condition-card--amber .byr-condition-body h4 { color: #FBB924; }
.byr-condition-body p { font-size: var(--text-sm) !important; color: var(--color-text-secondary) !important; line-height: var(--leading-relaxed) !important; margin: 0 0 .9rem 0 !important; }
.byr-condition-body p:last-child { margin-bottom: 0 !important; }
.byr-condition-subsections { display: flex; flex-direction: column; gap: 1.25rem; }
.byr-condition-subsection { padding-top: 1rem; border-top: 1px solid rgba(148, 163, 184, .1); }
.byr-condition-subsection:first-child { padding-top: 0; border-top: none; }

/* Resource links at bottom of condition cards */
.byr-condition-links {
  list-style: none;
  padding: 1rem 0 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.byr-condition-links li { font-size: var(--text-sm); }
.byr-condition-links a {
  color: var(--color-accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.byr-condition-links a:hover { color: var(--color-accent-secondary); }
.byr-condition-links a:focus-visible {
  outline: 3px solid var(--color-accent-primary);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ============================================================
   TREATMENT CARDS — Frosted glass with pastel glow
   ============================================================ */
.byr-treatment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.byr-tx-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.75), rgba(30, 41, 59, 0.55));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 1.2rem;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.4s ease;
}

.byr-tx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,
    rgba(34, 211, 238, 0.04) 0%,
    rgba(96, 165, 250, 0.03) 40%,
    rgba(168, 85, 247, 0.02) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.byr-tx-card > * { position: relative; z-index: 1; }

.byr-tx-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.40);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(34, 211, 238, 0.10),
              0 0 50px rgba(34, 211, 238, 0.05),
              inset 0 1px 0 rgba(34, 211, 238, 0.06);
}

.byr-tx-name { font-size: var(--text-md); font-weight: 700; color: var(--color-heading); margin: 0 0 .2rem 0; line-height: var(--leading-snug); }
.byr-tx-sub { font-size: .72rem; color: var(--color-text-muted); margin: 0 0 .8rem 0; text-transform: uppercase; letter-spacing: .06em; }
.byr-tx-body { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: var(--leading-relaxed); margin: 0 0 .85rem 0; }

/* ── Badges ── */
.byr-badge { display: inline-block; font-size: .68rem; font-weight: 700; padding: .2rem .65rem; border-radius: 20px; letter-spacing: .04em; }
.byr-badge-caution { background: rgba(251, 191, 36, .12); color: #FBB924; border: 1px solid rgba(251, 191, 36, .28); }
.byr-badge-preclinical { background: rgba(148, 163, 184, .1); color: var(--color-text-muted); border: 1px solid var(--color-border-subtle); }
.byr-badge-promising { background: rgba(16, 185, 129, .1); color: var(--color-accent-secondary); border: 1px solid rgba(16, 185, 129, .22); }
.byr-badge-approved { background: rgba(34, 211, 238, .1); color: var(--color-accent-primary); border: 1px solid rgba(34, 211, 238, .22); }


/* ============================================================
   GAPS GRID + PATTERN NOTE + CONTACT BOX
   ============================================================ */
.byr-gaps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.byr-gap-item { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem 1.3rem; background: var(--color-bg-elevated); border: 1px solid var(--color-border-subtle); border-radius: 10px; font-size: var(--text-sm); color: var(--color-text-secondary); line-height: var(--leading-relaxed); }
.byr-gap-arrow { color: var(--color-accent-primary); font-weight: 700; flex-shrink: 0; margin-top: .05rem; }
.byr-gap-item strong { color: var(--color-heading); }
.byr-gap-pattern-note { background: rgba(34, 211, 238, .04); border: 1px solid rgba(34, 211, 238, .12); border-left: 3px solid rgba(34, 211, 238, .35); border-radius: 12px; padding: 1.1rem 1.4rem; margin: 1.5rem 0; }
.byr-gap-pattern-note p { font-size: var(--text-sm) !important; color: var(--color-text-secondary) !important; margin: 0 !important; line-height: var(--leading-relaxed) !important; }
.byr-gap-pattern-note strong { color: var(--color-accent-primary) !important; }
.byr-contact-box { background: rgba(16, 185, 129, .07); border: 1px solid rgba(16, 185, 129, .22); border-radius: 12px; padding: 1.35rem 1.5rem; margin: 1.5rem 0 0; }
.byr-contact-box p { font-size: var(--text-sm) !important; color: var(--color-text-secondary) !important; margin: 0 !important; line-height: var(--leading-relaxed) !important; }
.byr-contact-box strong { color: var(--color-accent-secondary) !important; }


/* ============================================================
   HERO IMAGE, SECTION IMAGE, VIDEO
   ============================================================ */
.byr-res-hero-img { margin: 0; padding: 0; border-radius: var(--radius-md); overflow: hidden; position: relative; line-height: 0; }
.byr-res-hero-img img { width: 100%; height: clamp(220px, 38vw, 460px); object-fit: cover; object-position: center 35%; border-radius: var(--radius-md); display: block; transition: transform 9s ease; }
.byr-res-hero-img:hover img { transform: scale(1.025); }
.byr-res-hero-img::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-md); background: linear-gradient(to bottom, transparent 40%, rgba(10, 15, 28, 0.50) 75%, rgba(10, 15, 28, 0.90) 100%); pointer-events: none; }
.byr-res-hero-img figcaption { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; font-family: 'Cormorant Garamond', 'Georgia', serif; font-size: var(--text-sm); font-style: italic; color: rgba(220, 215, 200, 0.72); letter-spacing: 0.05em; padding: 0 var(--space-lg); z-index: 2; line-height: 1.4; }

.byr-res-section-img { margin: 0 0 var(--space-lg) 0; padding: 0; border-radius: 12px; overflow: hidden; position: relative; line-height: 0; border: 1px solid var(--color-border-subtle); }
.byr-res-section-img img { width: 100%; height: clamp(180px, 30vw, 360px); object-fit: cover; object-position: center 30%; border-radius: 12px; display: block; transition: transform 8s ease; }
.byr-res-section-img:hover img { transform: scale(1.02); }
.byr-res-section-img::after { content: ''; position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(135deg, rgba(34, 211, 238, 0.06) 0%, transparent 40%, rgba(10, 15, 28, 0.60) 100%); pointer-events: none; }
.byr-res-section-img figcaption { position: absolute; bottom: 0.9rem; right: 1.2rem; max-width: 55%; text-align: right; font-family: 'Cormorant Garamond', 'Georgia', serif; font-size: var(--text-xs); font-style: italic; color: rgba(220, 215, 200, 0.68); letter-spacing: 0.04em; z-index: 2; line-height: 1.4; }

.byr-res-video-wrap { position: relative; border-radius: 12px; overflow: hidden; margin: 1.75rem auto; border: 1px solid var(--color-border-subtle); background: #000; line-height: 0; max-width: 360px; }
.byr-res-video-wrap video { width: 100%; display: block; border-radius: 12px; }
.byr-res-video-wrap::after { content: ''; position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(to bottom, rgba(34, 211, 238, 0.04) 0%, transparent 30%, rgba(10, 15, 28, 0.30) 100%); pointer-events: none; }
.byr-res-video-caption { text-align: center; font-family: 'Cormorant Garamond', 'Georgia', serif; font-size: var(--text-sm); font-style: italic; color: var(--color-text-muted); letter-spacing: 0.04em; margin: 0.6rem 0 0 0; line-height: 1.4; }


/* ============================================================
   LIGHT MODE
   ============================================================ */

/* Support / org cards */
.mode-light .byr-res-support-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(248, 250, 252, 0.60));
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.mode-light .byr-res-support-card::before { background: linear-gradient(160deg, rgba(5, 150, 105, 0.03) 0%, rgba(16, 185, 129, 0.02) 40%, transparent 100%); }
.mode-light .byr-res-support-card:hover {
  border-color: rgba(5, 150, 105, 0.30);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(5, 150, 105, 0.06);
}
.mode-light .byr-res-support-card--cyan::before { background: linear-gradient(160deg, rgba(8, 145, 178, 0.03) 0%, rgba(29, 78, 216, 0.02) 40%, transparent 100%); }
.mode-light .byr-res-support-card--cyan:hover {
  border-color: rgba(8, 145, 178, 0.30);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(8, 145, 178, 0.06);
}

/* Tool cards */
.mode-light .byr-res-tool-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(248, 250, 252, 0.60));
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.mode-light .byr-res-tool-card::before { background: linear-gradient(160deg, rgba(8, 145, 178, 0.03) 0%, rgba(29, 78, 216, 0.02) 40%, transparent 100%); }
.mode-light .byr-res-tool-card:hover {
  border-color: rgba(8, 145, 178, 0.30);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(8, 145, 178, 0.06);
}

/* Condition cards */
.mode-light .byr-condition-card { border-color: rgba(0, 0, 0, 0.06); }
.mode-light .byr-condition-header { background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(248, 250, 252, 0.60)); }
.mode-light .byr-condition-body { background: linear-gradient(145deg, rgba(255, 255, 255, 0.75), rgba(248, 250, 252, 0.55)); }
.mode-light .byr-condition-card--red:hover {
  border-color: rgba(220, 38, 38, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(220, 38, 38, 0.06);
}
.mode-light .byr-condition-card--violet:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(124, 58, 237, 0.06);
}
.mode-light .byr-condition-card--amber:hover {
  border-color: rgba(180, 130, 0, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(180, 130, 0, 0.06);
}

/* Treatment cards */
.mode-light .byr-tx-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.80), rgba(248, 250, 252, 0.60));
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.mode-light .byr-tx-card::before { background: linear-gradient(160deg, rgba(8, 145, 178, 0.03) 0%, rgba(29, 78, 216, 0.02) 40%, transparent 100%); }
.mode-light .byr-tx-card:hover {
  border-color: rgba(8, 145, 178, 0.30);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 0 20px rgba(8, 145, 178, 0.06);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .byr-res-section[id] { scroll-margin-top: 10rem; }
  .admin-bar .byr-res-section[id] { scroll-margin-top: calc(10rem + 46px); }
}

@media (max-width: 560px) {
  .byr-res-support-grid,
  .byr-res-tools-grid { grid-template-columns: 1fr; }
  .byr-res-section-img figcaption { max-width: 80%; right: 0.8rem; }
  .byr-res-video-wrap { max-width: 100%; }
  .byr-treatment-grid { grid-template-columns: 1fr; }
  .byr-gaps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .byr-res-section { margin-bottom: 2.5rem; }
  .byr-condition-header { padding: 1rem 1.15rem .85rem; }
  .byr-condition-body { padding: 1rem 1.15rem; }
  .byr-tx-card { padding: 1rem; }
  .byr-contact-box, .byr-gap-pattern-note { padding: 1rem 1.1rem; }
}

@media (max-width: 375px) {
  .byr-condition-title-row { flex-direction: column; gap: .4rem; }
  .byr-condition-gene { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .byr-res-support-card, .byr-res-tool-card, .byr-tx-card, .byr-condition-card { transition: none; }
  .byr-res-support-card:hover, .byr-res-tool-card:hover, .byr-tx-card:hover, .byr-condition-card:hover { transform: none; }
  .byr-res-support-card::before, .byr-res-tool-card::before, .byr-tx-card::before { transition: none; }
  .byr-res-hero-img img, .byr-res-section-img img { transition: none; }
  .byr-res-hero-img:hover img, .byr-res-section-img:hover img { transform: none; }
}

@media (forced-colors: active) {
  .byr-res-support-card, .byr-res-tool-card, .byr-tx-card {
    background: Canvas; border: 2px solid CanvasText; backdrop-filter: none;
  }
  .byr-res-support-card::before, .byr-res-tool-card::before, .byr-tx-card::before { display: none; }
  .byr-condition-card { background: Canvas; border: 2px solid CanvasText; }
  .byr-condition-header, .byr-condition-body { background: Canvas; backdrop-filter: none; }
}
