/* Article section (/articles) -- CONTENT styles only.
   The header, footer, fonts and palette come from /ayuslab-styles.css so these
   pages are visually part of the marketing site. Everything here is prefixed
   .rs- and inherits the site's :root variables. */

.rs-page{
  --rs-ink:var(--ink, #0B1224);
  --rs-ink2:var(--muted, #4B5563);
  --rs-muted:#6B7280;
  --rs-line:var(--line, #E2E5EA);
  --rs-line2:#EFF1F4;
  --rs-accent:var(--orange, #E97724);
  --rs-accent-deep:var(--orange-deep, #C45D14);
  --rs-accent-soft:var(--orange-soft, #FFF1E5);
  --rs-navy:var(--navy, #0F1A33);
  --rs-soft:var(--paper-2, #F6F7F9);
  color:var(--rs-ink);
}

/* Match the site's container width and gutters exactly */
.rs-wrap{max-width:1320px;margin:0 auto;padding:0 48px}
/* Base link colour. Wrapped in :where() so it contributes ZERO specificity to
   the .rs-page part -- otherwise `.rs-page a` (0,1,1) silently outranks every
   single-class component like .rs-btn or .rs-tag (0,1,0) and repaints their
   text. That is how the CTA button ended up with orange text on an orange
   background. Component classes must always win over this default. */
:where(.rs-page) a{color:var(--rs-accent)}
.rs-page img{max-width:100%;height:auto}

/* ---------- breadcrumb ----------
   The site stylesheet targets the bare `nav` element for the sticky site
   header (display:flex, justify-content:space-between, position:sticky,
   padding:18px 48px). A semantic <nav> breadcrumb inherits all of it, so each
   property is reset explicitly rather than by dropping the element. */
.rs-page nav.rs-crumb{
  position:static;top:auto;z-index:auto;
  background:none;backdrop-filter:none;-webkit-backdrop-filter:none;
  border-bottom:none;
  display:block;
  padding:28px 0 0;
  font-size:13px;color:var(--rs-muted);
}
.rs-crumb a{color:var(--rs-muted);text-decoration:none}
.rs-crumb a:hover{color:var(--rs-accent);text-decoration:underline}
.rs-crumb span{color:var(--rs-ink2)}

/* ---------- hero ---------- */
.rs-hero{padding:26px 0 34px;border-bottom:1px solid var(--rs-line2);margin-bottom:38px}
.rs-hero h1{font-size:44px;line-height:1.1;letter-spacing:-.025em;color:var(--rs-navy);margin:0 0 14px;font-weight:700}
.rs-hero p{font-size:18px;color:var(--rs-ink2);margin:0;max-width:640px;line-height:1.55}

/* ---------- layout ---------- */
.rs-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:60px;align-items:start;padding-bottom:80px}
/* The 760px measure is for running body text. A card listing should use the
   full column, so the cap is scoped to the article page only. */
.rs-main{min-width:0}
.rs-article{max-width:760px}

/* ---------- listing cards ---------- */
.rs-tile{
  display:grid;grid-template-columns:300px minmax(0,1fr);
  background:#fff;border:1px solid var(--rs-line);border-radius:14px;overflow:hidden;
  margin-bottom:22px;text-decoration:none;color:inherit;
  transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.rs-tile:hover{
  box-shadow:0 4px 12px rgba(15,23,42,.06), 0 12px 28px rgba(15,23,42,.08);
  border-color:#d3dae4;transform:translateY(-2px);
}
/* One tab stop per article, with a clear focus ring for keyboard users. */
.rs-tile:focus-visible{outline:3px solid var(--rs-accent);outline-offset:3px}

.rs-tile-media{position:relative;background:var(--rs-soft);min-height:210px}
.rs-tile-media img{width:100%;height:100%;object-fit:cover;display:block}
.rs-tile-fallback{
  position:absolute;inset:0;display:flex;align-items:flex-end;padding:22px;
}
.rs-tile-fallback:after{
  content:"";position:absolute;top:-30%;left:-15%;width:150%;height:60%;
  background:rgba(255,255,255,.10);transform:rotate(-24deg);
}
.rs-tile-fallback-txt{
  position:relative;color:#fff;font-family:Georgia,"Times New Roman",serif;
  font-size:21px;line-height:1.25;opacity:.94;
}

.rs-tile-body{padding:24px 28px}
.rs-tile-meta{
  margin:0 0 8px;font-size:13px;color:var(--rs-muted);font-weight:600;
  display:flex;flex-wrap:wrap;gap:7px;align-items:center;
}
.rs-tile-cat{color:var(--rs-accent-deep)}
.rs-tile-title{
  margin:0 0 10px;font-family:Georgia,"Times New Roman",serif;
  font-size:29px;line-height:1.2;letter-spacing:-.01em;color:var(--rs-navy);font-weight:700;
}
.rs-tile:hover .rs-tile-title{color:var(--rs-accent-deep)}
/* 4-5 line excerpt, clamped so every card keeps the same rhythm. */
.rs-tile-excerpt{
  margin:0 0 14px;color:var(--rs-ink2);font-size:16px;line-height:1.62;
  display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;
}
.rs-tile-more{color:var(--rs-accent-deep);font-weight:600;font-size:15px}
.rs-tile:hover .rs-tile-more{text-decoration:underline}

/* ---------- back links ---------- */
.rs-back{
  display:inline-block;margin:6px 0 14px;font-size:14px;font-weight:600;
  color:var(--rs-muted);text-decoration:none;
}
.rs-back:hover{color:var(--rs-accent-deep)}
.rs-back-foot{margin:40px 0 0;font-size:15px}
.rs-back-foot a{color:var(--rs-accent-deep);font-weight:600;text-decoration:none}
.rs-back-foot a:hover{text-decoration:underline}

/* ---------- article banner ---------- */
.rs-banner{
  position:relative;border-radius:16px;overflow:hidden;margin:4px 0 8px;
  min-height:340px;display:flex;align-items:flex-end;isolation:isolate;
}
.rs-banner-img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0;
}
/* Scrim: an uploaded photo can be any brightness, so the title needs a
   guaranteed dark base underneath it rather than luck. */
.rs-banner:before{
  content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg, rgba(8,16,30,.15) 0%, rgba(8,16,30,.55) 55%, rgba(8,16,30,.86) 100%);
}
.rs-banner.is-fallback:before{
  background:linear-gradient(180deg, rgba(8,16,30,0) 0%, rgba(8,16,30,.35) 60%, rgba(8,16,30,.7) 100%);
}
.rs-banner.is-fallback:after{
  content:"";position:absolute;top:-30%;left:-15%;width:150%;height:60%;z-index:1;
  background:rgba(255,255,255,.08);transform:rotate(-24deg);
}
.rs-banner-inner{position:relative;z-index:2;padding:34px 38px 30px;width:100%}
.rs-banner-cat{
  display:inline-block;margin-bottom:12px;padding:4px 12px;border-radius:13px;
  background:rgba(255,255,255,.18);color:#fff;font-size:12px;font-weight:600;
  letter-spacing:.03em;backdrop-filter:blur(4px);
}
.rs-banner h1{
  margin:0 0 12px;color:#fff;font-family:Georgia,"Times New Roman",serif;
  font-size:42px;line-height:1.14;letter-spacing:-.01em;font-weight:700;
  text-shadow:0 1px 12px rgba(0,0,0,.35);
}
.rs-banner-meta{
  margin:0;color:rgba(255,255,255,.92);font-size:14.5px;
  display:flex;flex-wrap:wrap;gap:8px;align-items:center;
}
.rs-banner-meta strong{color:#fff;font-weight:600}
.rs-banner-meta .rs-dot{color:rgba(255,255,255,.5)}
.rs-banner-caption{margin:10px 0 0;font-size:13.5px;color:var(--rs-muted)}

@media (max-width:768px){
  .rs-banner{min-height:260px}
  .rs-banner-inner{padding:24px 22px 22px}
  .rs-banner h1{font-size:29px}
}

/* ---------- article ---------- */
.rs-lede{font-size:20px;line-height:1.58;color:var(--rs-ink2);margin:0 0 30px}

.rs-body{font-size:17.5px;line-height:1.78;color:var(--rs-ink)}
.rs-body > *:first-child{margin-top:0}
.rs-body h2{font-size:28px;line-height:1.28;margin:46px 0 14px;color:var(--rs-navy);font-weight:650;letter-spacing:-.02em;scroll-margin-top:96px}
.rs-body h3{font-size:21px;line-height:1.35;margin:34px 0 10px;color:var(--rs-navy);font-weight:650;scroll-margin-top:96px}
.rs-body p{margin:0 0 22px}
.rs-body ul,.rs-body ol{margin:0 0 22px;padding-left:26px}
.rs-body li{margin-bottom:9px}
.rs-body a{color:var(--rs-accent);text-decoration:underline;text-underline-offset:2px}
.rs-body table{border-collapse:collapse;width:100%;margin:26px 0;font-size:15.5px;display:block;overflow-x:auto}
.rs-body th,.rs-body td{border:1px solid var(--rs-line);padding:11px 14px;text-align:left}
.rs-body th{background:var(--rs-soft);font-weight:600;color:var(--rs-navy)}
.rs-body blockquote{border-left:3px solid var(--rs-accent);margin:26px 0;padding:4px 0 4px 22px;color:var(--rs-ink2)}
.rs-body blockquote p:last-child{margin-bottom:0}
.rs-body pre{background:var(--rs-soft);border:1px solid var(--rs-line2);padding:18px;border-radius:10px;overflow-x:auto;font-size:14px;font-family:var(--mono,monospace)}
.rs-body code{background:var(--rs-soft);padding:2px 6px;border-radius:4px;font-size:15px;font-family:var(--mono,monospace)}
.rs-body pre code{background:none;padding:0}
.rs-body img{border-radius:10px;margin:8px 0}
.rs-body hr{border:none;border-top:1px solid var(--rs-line);margin:40px 0}

/* ---------- opt out of the site's scroll-reveal ----------
   ayuslab-script.js adds .reveal (opacity:0) to EVERY <section> and only
   un-hides it when an IntersectionObserver fires. On an article page the only
   two <section> elements are the CTA and the related-articles block -- the
   conversion path and internal linking. Those are content, not decoration, and
   must not disappear if the observer never fires (JS error earlier on the page,
   an older browser, a bot that runs scripts but does not scroll).
   Specificity (0,2,0) beats .reveal without needing !important. */
.rs-page .reveal,
.rs-page .reveal-left,
.rs-page .reveal-right,
.rs-page .reveal-scale{opacity:1;transform:none}

/* ---------- CTA ---------- */
.rs-cta{background:var(--rs-accent-soft);border:1px solid #F6D9BC;border-radius:16px;padding:30px 32px;margin:48px 0 0}
.rs-cta h3{margin:0 0 8px;color:var(--rs-navy);font-size:21px;font-weight:700;letter-spacing:-.015em}
.rs-cta p{margin:0;color:var(--rs-ink2);font-size:16px;max-width:540px}
/* Uses --orange-deep rather than --orange: white on #E97724 is only 2.95:1,
   which is hard to read at 15.5px. The deeper tone is already in the site
   palette and lifts it to ~4.3:1. */
.rs-btn{
  display:inline-block;background:var(--rs-accent-deep);color:#fff;padding:12px 24px;border-radius:8px;
  text-decoration:none;margin-top:18px;font-weight:600;font-size:15.5px;
}
.rs-btn:hover{background:#a94e11;color:#fff}

/* ---------- related ---------- */
.rs-related{margin-top:52px;padding-top:30px;border-top:1px solid var(--rs-line2)}
.rs-related h3{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--rs-muted);margin:0 0 15px;font-weight:600}
.rs-related ul{list-style:none;padding:0;margin:0}
.rs-related li{padding:12px 0;border-bottom:1px solid var(--rs-line2)}
.rs-related li:last-child{border-bottom:none}
.rs-related a{color:var(--rs-navy);text-decoration:none;font-weight:550;font-size:16px}
.rs-related a:hover{color:var(--rs-accent)}

/* ---------- sidebar ---------- */
.rs-side{position:sticky;top:100px}
.rs-side h4{font-size:11.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--rs-muted);margin:0 0 13px;font-weight:600}
.rs-side ul{list-style:none;padding:0;margin:0 0 32px}
.rs-side li{margin-bottom:2px}
.rs-side a{
  color:var(--rs-ink2);text-decoration:none;font-size:14px;display:block;padding:7px 0 7px 13px;
  border-left:2px solid #F3D9C0;line-height:1.45;
  transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.rs-side a:hover{color:var(--rs-navy);border-left-color:var(--rs-accent);background:var(--rs-soft)}
/* Scroll-spy: the section currently in view gets a solid orange marker.
   Purely decorative -- with JavaScript off the list still reads and links
   still work (acceptance criterion #5). */
.rs-side a.is-active{
  color:var(--rs-navy);font-weight:600;
  border-left-color:var(--rs-accent-deep);border-left-width:3px;
  padding-left:12px;background:var(--rs-accent-soft);
}
.rs-side .lvl3{padding-left:26px;font-size:13.5px}

/* ---------- pagination ----------
   will_paginate emits Bootstrap-style markup:
     <ul class="pagination"><li class="active"><span>1</span></li>
                            <li><a href="?page=2">2</a></li>
                            <li class="prev disabled"><span>Previous</span></li></ul>
   so the current page is an <li class="active"> wrapping a <span>, not an
   <em class="current">. Styling the wrong element left the current page
   visually identical to the others. */
.rs-pager{margin:38px 0 0}
.rs-pager .pagination{display:flex;gap:6px;list-style:none;padding:0;margin:0;flex-wrap:wrap}
.rs-pager li{display:block}
.rs-pager li a,
.rs-pager li span{
  display:inline-block;padding:8px 14px;border:1px solid var(--rs-line);border-radius:8px;
  text-decoration:none;font-size:14px;color:var(--rs-ink2);font-style:normal;line-height:1.3;
}
.rs-pager li a:hover{background:var(--rs-soft);border-color:#D5DBE3;color:var(--rs-navy)}
.rs-pager li.active span{
  background:var(--rs-accent-deep);border-color:var(--rs-accent-deep);color:#fff;font-weight:600;
}
.rs-pager li.disabled span{color:#BAC2CD;border-color:var(--rs-line2);background:transparent}
.rs-pager .gap{border:none;color:var(--rs-muted)}

/* ---------- states ---------- */
.rs-empty{padding:80px 0;text-align:center;color:var(--rs-muted)}
.rs-empty h1{font-size:29px;color:var(--rs-navy);margin:0 0 12px;font-weight:700}
.rs-preview-bar{background:#FFF8E6;border-bottom:1px solid #ECD9A4;padding:12px 0;font-size:14px;color:#6B5106}

@media (max-width:1024px){
  .rs-layout{grid-template-columns:1fr;gap:0}
  .rs-side{position:static;border-top:1px solid var(--rs-line2);padding-top:28px;margin-top:36px}
  .rs-main{max-width:none}
}
@media (max-width:860px){
  .rs-tile{grid-template-columns:1fr}
  .rs-tile-media{min-height:190px;max-height:230px}
  .rs-tile-title{font-size:24px}
}
@media (max-width:768px){
  .rs-wrap{padding:0 20px}
    .rs-hero h1{font-size:31px}
  .rs-body{font-size:16.5px}
}

/* ---------- author bios ---------- */
.rs-authors{margin:48px 0 0;padding-top:30px;border-top:1px solid var(--rs-line2)}
.rs-authors h3{
  font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--rs-muted);
  margin:0 0 18px;font-weight:600;
}
.rs-author{display:flex;gap:16px;padding:16px 0;border-bottom:1px solid var(--rs-line2)}
.rs-author:last-child{border-bottom:none}
.rs-author-avatar{
  flex:none;width:52px;height:52px;border-radius:50%;background:var(--rs-navy);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:600;font-size:17px;letter-spacing:.02em;
}
.rs-author-body{min-width:0}
.rs-author-name{margin:0 0 3px;font-size:16.5px;font-weight:650;color:var(--rs-navy)}
.rs-author-cred{font-weight:400;color:var(--rs-ink2)}
.rs-author-title{margin:0 0 6px;font-size:14px;color:var(--rs-muted)}
.rs-author-bio{margin:0;font-size:15px;line-height:1.6;color:var(--rs-ink2)}
.rs-author-link{display:inline-block;margin-top:7px;font-size:14px;font-weight:600;color:var(--rs-accent-deep)}
