/* ==========================================================================
   7Fabs Resource Library — page styles.
   Layers on the site's existing /styles.css. Uses only the :root custom
   properties already defined there (--ink, --muted, --line, --soft-line,
   --panel, --surface, --surface-strong, --accent, --accent-dark,
   --accent-soft, --dark-band, --shadow, --shadow-sm, --radius, --radius-lg).

   At merge time this can either be linked as a separate stylesheet or folded
   into styles.css. Every class is namespaced .rl-* so nothing collides.
   ========================================================================== */

/* ------------------------------------------------------------ hero + video */
.rl-hero { padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.rl-hero__grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); align-items: center;
}
.rl-hero h1 { margin: 0 0 .8rem; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.12; letter-spacing: -.025em; }
.rl-video {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #11191d, #1d2a30);
  display: grid; place-items: center; box-shadow: var(--shadow); overflow: hidden;
}
.rl-video video, .rl-video iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }
.rl-video__play { width: 4.2rem; height: 4.2rem; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.rl-video__play::before { content: ""; border-left: 1.15rem solid #11191d; border-top: .7rem solid transparent; border-bottom: .7rem solid transparent; margin-left: .28rem; }
.rl-video__ph { position: absolute; left: 1rem; right: 1rem; bottom: .9rem; text-align: center; color: #9fb0b8; font-size: .76rem; }

/* ---------------------------------------------------------------- ask bar */
.rl-ask { padding: .5rem 0 2.75rem; }
.rl-ask__box {
  display: flex; align-items: center; gap: .75rem; max-width: 46rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem .5rem .5rem 1.3rem; box-shadow: var(--shadow-sm);
}
.rl-ask__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rl-ask__icon { width: 1.1rem; height: 1.1rem; flex: none; opacity: .45; }
.rl-ask__box input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1rem; background: transparent; padding: .55rem 0; min-width: 0; }
/* Hand-off bar. Looks like a search field but is a link to /faq/, where the
   real ask bar lives. Deliberately not an <input> — a box you can type into
   that does nothing is worse than no box at all. */
.rl-askbar {
  display: flex; align-items: center; gap: .8rem; max-width: 46rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: .85rem 1rem .85rem 1.3rem; box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.rl-askbar:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rl-askbar__text { flex: 1; font-size: .96rem; min-width: 0; }
.rl-askbar__go { color: var(--accent-dark); font-weight: 650; font-size: .9rem; white-space: nowrap; }

.rl-suggest { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; max-width: 46rem; align-items: center; }
.rl-suggest > span { color: var(--muted); font-size: .84rem; }
.rl-suggest a { font-size: .84rem; text-decoration: none; color: var(--muted); background: var(--surface); border: 1px solid var(--soft-line); border-radius: 999px; padding: .3rem .8rem; }
.rl-suggest a:hover { color: var(--ink); border-color: var(--line); background: var(--panel); }

/* ------------------------------------------------------------------- tiles */
.rl-section { padding: 0 0 3rem; }
.rl-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.rl-section__head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.015em; }
.rl-section__head a { color: var(--accent-dark); font-size: .88rem; font-weight: 600; text-decoration: none; }
.rl-tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.rl-tile {
  display: flex; flex-direction: column; gap: .45rem; padding: 1.35rem 1.4rem 1.5rem;
  text-decoration: none; color: inherit; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rl-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.rl-tile h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; }
.rl-tile p { margin: 0; color: var(--muted); font-size: .89rem; line-height: 1.5; }
.rl-tile__more { margin-top: auto; padding-top: .7rem; color: var(--accent-dark); font-size: .82rem; font-weight: 600; }

.rl-secondary { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 1.6rem; background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--soft-line); }
.rl-secondary a { text-decoration: none; display: block; color: inherit; }
.rl-secondary h4 { margin: 0 0 .25rem; font-size: .96rem; }
.rl-secondary p { margin: 0; color: var(--muted); font-size: .85rem; }

/* ---------------------------------------------------------------- article */
.rl-article { padding: clamp(2rem, 4vw, 3rem) 0 1rem; }
.rl-article__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr) 15rem; align-items: start; }
.rl-crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 1rem; }
.rl-crumbs a { color: var(--muted); text-decoration: none; }
.rl-crumbs a:hover { color: var(--ink); }
.rl-article h1 { margin: 0 0 .7rem; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.14; letter-spacing: -.025em; }
.rl-article__intro { margin: 0 0 2rem; color: var(--muted); font-size: 1.1rem; line-height: 1.55; max-width: 40rem; }

.rl-prose { max-width: 42rem; }
.rl-prose h2 { margin: 2.6rem 0 .8rem; font-size: 1.4rem; letter-spacing: -.018em; scroll-margin-top: 6rem; }
.rl-prose h2:first-child { margin-top: 0; }
.rl-prose h3 { margin: 1.9rem 0 .5rem; font-size: 1.08rem; letter-spacing: -.01em; scroll-margin-top: 6rem; }
.rl-prose p { margin: 0 0 1.05rem; line-height: 1.68; }
.rl-prose ul, .rl-prose ol { margin: 0 0 1.15rem; padding-left: 1.3rem; }
.rl-prose li { margin-bottom: .5rem; line-height: 1.6; }
.rl-prose a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.rl-prose strong { font-weight: 650; }
.rl-prose code { background: var(--surface-strong); padding: .12em .4em; border-radius: .3rem; font-size: .9em; }
.rl-prose hr { border: 0; border-top: 1px solid var(--soft-line); margin: 2.2rem 0; }

.rl-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .92rem; }
.rl-prose thead th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1.5px solid var(--line); padding: 0 .8rem .55rem 0; }
.rl-prose tbody td { border-bottom: 1px solid var(--soft-line); padding: .7rem .8rem .7rem 0; vertical-align: top; line-height: 1.5; }
.rl-prose tbody tr:last-child td { border-bottom: 0; }
.rl-prose thead th:last-child, .rl-prose tbody td:last-child { padding-right: 0; }

.rl-callout {
  margin: 1.6rem 0; padding: 1.05rem 1.25rem;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: .96rem; line-height: 1.6;
}
.rl-callout p { margin: 0; }

/* -------------------------------------------------------------- side rail */
.rl-rail { position: sticky; top: 5.5rem; display: grid; gap: 1.25rem; }
.rl-rail__card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; background: var(--panel); }
.rl-rail__card h4 { margin: 0 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.rl-rail__card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.rl-rail__card a { color: var(--ink); text-decoration: none; font-size: .89rem; line-height: 1.4; }
.rl-rail__card a:hover { color: var(--accent-dark); }
.rl-rail__cta { background: var(--dark-band); color: #eef2f0; border-color: transparent; }
.rl-rail__cta h4 { color: #9fb0a8; }
.rl-rail__cta { color: #eef2f0; }
.rl-rail__cta p { margin: 0 0 .85rem; font-size: .88rem; color: #c3ccc7; line-height: 1.5; }

/* --------------------------------------------------------------- CTA band */
.rl-cta {
  margin: 2.5rem 0 0; padding: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--dark-band); color: #eef2f0; border-radius: var(--radius-lg);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
}
.rl-cta h2 { margin: 0 0 .3rem; font-size: 1.4rem; letter-spacing: -.015em; color: #fff; }
.rl-cta p { margin: 0; color: #a9b6b1; font-size: .95rem; max-width: 38rem; }

/* ------------------------------------------------- pre-existing site fixes
   These are NOT resource-library styles. They correct two collisions that
   already exist in styles.css, patched here because this file loads after it
   and the ownership boundary for this job excludes site/. Both should be
   fixed at source in styles.css at merge time and these rules deleted.

   1. `.marketing-site h3` (specificity 0,1,1) is declared AFTER
      `.footer-col h3` (also 0,1,1), so it wins and the footer column
      headings render dark ink on the dark footer band — invisible. This
      affects every page carrying the marketing-site body class, not just
      these. Worth checking the live site.
   2. `.eyebrow a` inherits the global underlined link style, which reads as
      a stray underline on an all-caps label rather than a back-link.
   -------------------------------------------------------------------------- */
.marketing-site .site-footer .footer-col h3 { color: #fff; }
.marketing-site .eyebrow a { color: inherit; text-decoration: none; }
.marketing-site .eyebrow a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- downloads */
.rl-dl-list { display: grid; gap: 1rem; margin-bottom: 1rem; }
.rl-dl {
  display: grid; gap: 1.1rem; align-items: start;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  padding: 1.4rem 1.5rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .15s, box-shadow .15s;
}
.rl-dl:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.rl-dl__icon {
  width: 2.6rem; height: 2.6rem; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center;
}
.rl-dl__icon svg { width: 1.35rem; height: 1.35rem; }
.rl-dl__body h3 { margin: 0 0 .3rem; font-size: 1.05rem; letter-spacing: -.012em; }
.rl-dl__body p { margin: 0; font-size: .92rem; line-height: 1.55; }
.rl-dl__when { margin-top: .45rem !important; color: var(--muted); font-size: .86rem !important; }
.rl-dl__act { display: grid; gap: .5rem; justify-items: stretch; text-align: center; }
.rl-dl__act .button { white-space: nowrap; }
.rl-dl__meta { color: var(--muted); font-size: .78rem; letter-spacing: .01em; }

@media (max-width: 720px) {
  .rl-dl { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .rl-dl__act { grid-column: 1 / -1; justify-items: start; text-align: left; }
}

/* ------------------------------------------------------------------ index */
.rl-index-group { margin-bottom: 2.5rem; }
.rl-index-group h2 { margin: 0 0 .35rem; font-size: 1.2rem; letter-spacing: -.015em; }
.rl-index-group > p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }

@media (max-width: 960px) {
  .rl-article__grid { grid-template-columns: 1fr; }
  .rl-rail { position: static; }
}
@media (max-width: 860px) {
  .rl-hero__grid { grid-template-columns: 1fr; }
}

/* ---- Welcome video slot (RESOURCES-WELCOME-01) -------------------------
   Styled ahead of the video existing so that uncommenting the markup in
   index.html causes no layout shift and no restyling work. */
.rl-welcome {
  margin: 0 0 3rem;
  max-width: 46rem;
}
.rl-welcome__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #0f172a;
  box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.55);
}
.rl-welcome__caption {
  margin-top: 0.7rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #52606d;
}
@media (max-width: 640px) {
  .rl-welcome { margin-bottom: 2rem; }
  .rl-welcome__caption { font-size: 0.86rem; }
}
