/*
 * Styles for the static /resources pages.
 *
 * These pages are plain HTML rather than Angular components, so they cannot use the app's
 * component-scoped CSS. They pull the shared tokens from theme.css and define only the shell and
 * article typography here — deliberately a small file, since it loads render-blocking on every
 * page a search engine sends someone to.
 */

.rs-wrap { max-width: var(--uy-max); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- nav */
.rs-nav { border-bottom: 1px solid var(--uy-border); background: var(--uy-surface); }
.rs-nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.rs-brand {
  font-size: 21px; font-weight: 800; letter-spacing: -.02em;
  color: var(--uy-primary); text-decoration: none;
}
.rs-nav-links { display: flex; gap: 26px; flex: 1; flex-wrap: wrap; }
.rs-nav-links a { color: var(--uy-text-muted); font-size: 15px; font-weight: 500; text-decoration: none; }
.rs-nav-links a:hover { color: var(--uy-text); }

/* ---------------------------------------------------------------- layout */
.rs-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 72px;
}
@media (max-width: 900px) { .rs-main { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.rs-crumbs { grid-column: 1 / -1; font-size: 13px; color: var(--uy-text-muted); margin-bottom: 4px; }
.rs-crumbs a { color: var(--uy-text-muted); text-decoration: none; }
.rs-crumbs a:hover { color: var(--uy-text); text-decoration: underline; }
.rs-crumbs .sep { margin: 0 8px; opacity: .5; }

/* ---------------------------------------------------------------- article */
.rs-article { min-width: 0; color: var(--uy-text); }
.rs-article h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.025em; margin: 8px 0 12px; }
.rs-lede { font-size: 18px; line-height: 1.65; color: var(--uy-text-muted); margin: 0 0 28px; }
.rs-article h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.02em; margin: 40px 0 12px; }
.rs-article h3 { font-size: 18px; margin: 28px 0 8px; }
.rs-article p, .rs-article li { font-size: 16px; line-height: 1.75; }
.rs-article ul, .rs-article ol { padding-left: 22px; margin: 12px 0; }
.rs-article li { margin-bottom: 8px; }
.rs-article a { color: var(--uy-primary); }
.rs-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
  background: var(--uy-surface-alt); padding: 2px 5px; border-radius: 4px;
}
.rs-article pre {
  background: var(--uy-surface-alt); border: 1px solid var(--uy-border);
  border-radius: var(--uy-radius); padding: 14px 16px; overflow-x: auto;
}
.rs-article pre code { background: none; padding: 0; }
.rs-article blockquote {
  margin: 20px 0; padding: 14px 18px; border-left: 3px solid var(--uy-primary);
  background: var(--uy-surface-alt); border-radius: 0 var(--uy-radius) var(--uy-radius) 0;
  color: var(--uy-text);
}
.rs-article hr { border: 0; border-top: 1px solid var(--uy-border); margin: 36px 0; }

/* Wide tables scroll inside the column instead of widening the page. */
.table-wrap { overflow-x: auto; margin: 18px 0; }
.rs-article table { border-collapse: collapse; width: 100%; min-width: 460px; }
.rs-article th, .rs-article td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--uy-border); font-size: 15px;
}
.rs-article th { font-weight: 700; background: var(--uy-surface-alt); }

/* ---------------------------------------------------------------- contents */
.toc {
  border: 1px solid var(--uy-border); border-radius: var(--uy-radius);
  padding: 16px 20px; margin: 0 0 32px; background: var(--uy-surface-alt);
}
.toc h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--uy-text-muted); margin: 0 0 10px;
}
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 6px; }
.toc a { font-size: 15px; }

/* ---------------------------------------------------------------- cards */
.rs-cards { list-style: none; padding: 0; margin: 16px 0 8px; display: grid; gap: 12px; }
@media (min-width: 700px) { .rs-cards { grid-template-columns: 1fr 1fr; } }
.rs-cards a {
  display: block; height: 100%; padding: 18px 20px; text-decoration: none;
  border: 1px solid var(--uy-border); border-radius: var(--uy-radius); background: var(--uy-surface);
}
.rs-cards a:hover { border-color: var(--uy-primary); box-shadow: var(--uy-shadow); }
.rs-card-title { display: block; font-weight: 700; color: var(--uy-text); margin-bottom: 5px; }
.rs-card-desc { display: block; font-size: 14px; line-height: 1.55; color: var(--uy-text-muted); }

/* ---------------------------------------------------------------- faq + related */
.faq details {
  border-bottom: 1px solid var(--uy-border); padding: 14px 0;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; }
.faq summary::marker { color: var(--uy-primary); }
.faq p { margin: 10px 0 0; color: var(--uy-text-muted); }

.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 8px; }

.rs-updated { margin-top: 40px; font-size: 13px; color: var(--uy-text-muted); }

/* ---------------------------------------------------------------- cta */
.rs-cta {
  position: sticky; top: 24px;
  border: 1px solid var(--uy-border); border-radius: var(--uy-radius-lg);
  padding: 24px; background: var(--uy-surface-alt);
}
.rs-cta h2 { margin: 0 0 8px; font-size: 19px; }
.rs-cta p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--uy-text-muted); }
@media (max-width: 900px) { .rs-cta { position: static; } }

/* ---------------------------------------------------------------- footer */
.rs-footer { background: var(--uy-dark); color: var(--uy-on-dark); padding: 40px 0; }
.rs-foot-links { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 16px; }
.rs-foot-links a { color: var(--uy-on-dark); font-size: 14px; text-decoration: none; }
.rs-foot-links a:hover { color: var(--uy-primary); }
.rs-copy { margin: 0; font-size: 13px; color: var(--uy-on-dark-muted); }

/* ---------------------------------------------------------------- cookie banner */
/* Mirrors the app's ConsentBannerComponent styles. Duplicated rather than shared because these
   pages are plain HTML and cannot use Angular's component-scoped CSS. */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1200;
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #14181d; color: #fff;
  border-radius: 14px; padding: 15px 20px;
  box-shadow: 0 14px 38px rgba(16, 24, 40, .30);
}
.cookie-banner[hidden] { display: none; }
.cb-text { margin: 0; flex: 1; min-width: 220px; font-size: 13.5px; line-height: 1.5; color: #e7eaee; }
.cb-text a { color: #fff; text-decoration: underline; }
.cb-actions { display: flex; gap: 10px; flex: none; }
.cb-btn {
  border: none; border-radius: 9px; padding: 9px 18px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: filter .15s, background .15s;
}
.cb-decline { background: rgba(255, 255, 255, .12); color: #fff; }
.cb-decline:hover { background: rgba(255, 255, 255, .22); }
.cb-accept { background: var(--uy-primary, #008000); color: #fff; }
.cb-accept:hover { filter: brightness(1.08); }
@media (max-width: 520px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cb-actions { justify-content: flex-end; }
}

/* ---- screenshots in a walkthrough ----
   Bounded and bordered so a 1500px capture sits inside the reading column instead of stretching
   it, and so a screenshot with a white background still reads as a picture rather than as part
   of the page. */
.rs-shot {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0 24px;
  border: 1px solid var(--uy-border);
  border-radius: 12px;
  background: var(--uy-surface-alt);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .06);
}

/* Walkthrough: a self-playing strip of real screenshots.
   Frames are pre-composited to one canvas size, so switching between them is a plain opacity
   swap — nothing reflows and nothing jumps. Each frame's turn comes from its own delay; the
   keyframes themselves are written per instance by the build, since @keyframes cannot read how
   many frames there are. */
.rs-walk { margin: 28px 0; }
.rs-walk-stage {
  position: relative;
  aspect-ratio: 1120 / 792;
  border: 1px solid var(--uy-border);
  border-radius: 14px;
  background: #f5f7fa;
  overflow: hidden;
}
.rs-walk-step {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation-duration: var(--dur);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-delay: calc(var(--i) * var(--step));
}
.rs-walk-step img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.rs-walk-step figcaption {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-size: 14.5px; font-weight: 600;
  color: var(--uy-text);
  background: var(--uy-surface);
  border-top: 1px solid var(--uy-border);
}
.rs-walk-n {
  flex: none;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--uy-primary, #008000); color: #fff;
  font-size: 12.5px; font-weight: 700;
}

/* No animation: the same frames as a numbered strip. Someone who has asked their system to stop
   motion still needs the content, and this is also what the page prints as. */
@media (prefers-reduced-motion: reduce) {
  .rs-walk-stage {
    position: static;
    aspect-ratio: auto;
    border: 0; background: none; overflow: visible;
    display: grid; gap: 18px;
  }
  .rs-walk-step {
    position: static;
    opacity: 1;
    animation: none;
    border: 1px solid var(--uy-border);
    border-radius: 14px;
    overflow: hidden;
    background: #f5f7fa;
  }
  .rs-walk-step img { height: auto; }
}

/* A screen recording of the product in use. Sized like the screenshots so the article keeps one
   reading column, and letterboxed rather than cropped — a walkthrough that cuts off the cursor at
   the edge of the frame is worse than one with a little dark margin. */
.rs-video { margin: 28px 0; }
.rs-video video {
  display: block;
  width: 100%;
  aspect-ratio: 1280 / 668;
  background: #101828;
  border: 1px solid var(--uy-border);
  border-radius: 14px;
  object-fit: contain;
}
.rs-video figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--uy-text-muted);
}
