/* pnx-research.css - Penaxtra Security Research publication styling.
 *
 * A restrained, document-like treatment for the public research pages.
 * Scoped under .pnx-research so it never touches the marketing design
 * system. Single light theme (Command Center), so literal light-theme
 * values are used deliberately and kept consistent with the PDF palette.
 */

.pnx-research {
  --rs-ink: #23272e;
  --rs-navy: #16324f;
  --rs-navy-soft: #4a6b8a;
  --rs-muted: #5b6470;
  --rs-line: #dfe3e8;
  --rs-line-soft: #eceef1;
  --rs-paper: #ffffff;
  --rs-panel: #f6f8fa;
  --rs-amber: #b7791f;
  --rs-amber-bg: #fbf6ec;
  --rs-link: #2456c9;
  --rs-accent: #c64049;        /* brand red, deepened for light-surface accents */
  color: var(--rs-ink);
}

/* ---- publication metadata (dateline on the dark hero band) ----
   Rendered as a restrained, centered masthead line rather than filled
   chips, so it reads as publication metadata and not as buttons. Colours
   are explicit light-on-dark for the known dark page-header gradient. */
.rs-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin: 26px 0 0;
  /* A crisp white card lifted off the page tint, so the metadata reads
     as a defined object rather than washing into the background. Grid
     lines: border-top/left on the container + border-right/bottom on each
     cell draws single-width lines at any column count. */
  background: var(--rs-paper);
  border-top: 2px solid var(--rs-navy);
  border-left: 1px solid var(--rs-line);
  border-radius: 3px 3px 8px 8px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 1px 2px rgba(16, 42, 67, .05), 0 18px 40px -22px rgba(16, 42, 67, .22);
}
.rs-meta__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-right: 1px solid var(--rs-line);
  border-bottom: 1px solid var(--rs-line);
}
.rs-meta__k {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--rs-muted);
}
.rs-meta__v {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .005em;
  color: var(--rs-navy);
}
@media (max-width: 720px) {
  .rs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 460px; }
}
@media (max-width: 460px) {
  .rs-meta { grid-template-columns: 1fr; max-width: 320px; }
}

/* ---- minimal research nav (logo + 4 links, always visible) ---- */
.rs-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.rs-nav-links .pnx-nav-link { padding: 8px 12px; }
@media (max-width: 480px) {
  .rs-nav .pnx-nav-inner { flex-wrap: wrap; gap: 8px 0; }
  .rs-nav-links { gap: 4px; }
  .rs-nav-links .pnx-nav-link { padding: 6px 10px; }
}

/* ---- flat, publication-style header (dark hero band removed) ---- */
/* Sticky, lightly frosted masthead so navigation stays available while
   reading a long document. */
.pnx-research--flat .rs-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rs-line);
}
.pnx-research--flat .rs-nav .pnx-nav-inner {
  padding-top: 15px;
  padding-bottom: 15px;
  align-items: center;
}
/* brand masthead: mark + "Security Research" series label */
.rs-nav-brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.rs-nav-brand .pnx-logo { color: var(--rs-navy); display: inline-flex; }
.rs-nav-brand__sep { width: 1px; height: 22px; background: var(--rs-line); flex: 0 0 auto; }
.rs-nav-brand__series {
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--rs-navy-soft); text-decoration: none; white-space: nowrap;
}
.rs-nav-brand__series:hover { color: var(--rs-navy); }
/* nav links: quiet by default, navy + underline for the active page */
.pnx-research--flat .rs-nav-links { gap: 30px; }
.pnx-research--flat .rs-nav .pnx-nav-link {
  color: var(--rs-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .01em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.pnx-research--flat .rs-nav .pnx-nav-link:hover { color: var(--rs-navy); }
.pnx-research--flat .rs-nav .pnx-nav-link.is-active {
  color: var(--rs-navy);
  font-weight: 600;
  border-bottom-color: var(--rs-navy);
}

/* document header: breadcrumb, series eyebrow, title, lede, metadata.
   Section owns the top gap (kept tight, just below the nav); the header
   itself adds no top padding so there is no large empty band above. */
.pnx-research--flat .pnx-section--tight { padding-top: 20px; }
.rs-doc-head {
  padding: 0 0 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--rs-line);
}
.rs-doc-head .pnx-breadcrumb {
  text-align: left;
  margin: 0 0 22px;
  font-size: 12.5px;
}
.rs-doc-head .pnx-breadcrumb,
.rs-doc-head .pnx-breadcrumb a,
.rs-doc-head .pnx-breadcrumb span { color: var(--rs-muted); }
.rs-doc-head .pnx-breadcrumb a:hover { color: var(--rs-navy); }
.rs-doc-head__rule {
  display: block;
  width: 46px;
  height: 3px;
  background: var(--rs-accent);
  border-radius: 2px;
  margin: 0 0 18px;
}
.rs-doc-head__eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--rs-navy-soft);
  margin: 0 0 15px;
}
.rs-doc-head h1 {
  font-size: clamp(29px, 3.9vw, 42px);
  line-height: 1.1;
  letter-spacing: -.024em;
  color: var(--rs-navy);
  margin: 0 0 13px;
  max-width: 22ch;
  text-wrap: balance;
}
.rs-doc-head .lede {
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--rs-muted);
  max-width: 64ch;
  margin: 0;
}
@media (max-width: 600px) {
  .rs-nav-brand__sep, .rs-nav-brand__series { display: none; }
  .pnx-research--flat .pnx-section--tight { padding-top: 14px; }
}

/* ---- minimal legal footer (research chrome) ---- */
.rs-footer {
  border-top: 1px solid var(--rs-line);
  background: var(--rs-paper);
  padding: 30px 0 40px;
  margin-top: 48px;
}
.rs-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 13px;
}
.rs-footer__brand { color: var(--rs-navy); text-decoration: none; display: inline-flex; }
.rs-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 20px;
}
.rs-footer__links a { color: var(--rs-muted); text-decoration: none; font-size: 13.5px; }
.rs-footer__links a:hover { color: var(--rs-navy); }
.rs-footer__pub { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; color: var(--rs-ink); }
.rs-footer__copy { margin: 0; font-size: 12px; color: var(--rs-muted); }

/* ---- two-column document layout ---- */
.rs-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
  padding: 40px 0 24px;
}
.rs-toc {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  border-right: 1px solid var(--rs-line-soft);
  padding-right: 16px;
}
.rs-toc__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--rs-muted);
  margin: 0 0 10px;
}
.rs-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: rstoc; }
.rs-toc li { margin: 0 0 2px; }
.rs-toc a {
  display: block;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--rs-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.rs-toc a:hover { background: var(--rs-panel); color: var(--rs-navy); }
.rs-toc a.is-active { color: var(--rs-navy); border-left-color: var(--rs-navy); background: var(--rs-panel); font-weight: 600; }

.rs-main { min-width: 0; }

/* ---- prose ---- */
.rs-section { scroll-margin-top: 88px; margin: 0 0 40px; }
.rs-section > h2 {
  font-size: 24px;
  line-height: 1.2;
  color: var(--rs-navy);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rs-navy);
  letter-spacing: -.01em;
}
.rs-section h3 { font-size: 17px; color: var(--rs-navy); margin: 24px 0 8px; }
.rs-prose p { margin: 0 0 12px; line-height: 1.62; font-size: 15.5px; max-width: 72ch; }
.rs-prose ul { margin: 0 0 14px; padding-left: 20px; max-width: 72ch; }
.rs-prose li { margin: 0 0 6px; line-height: 1.55; font-size: 15.5px; }
.rs-note {
  border-left: 3px solid var(--rs-amber);
  background: var(--rs-amber-bg);
  color: #533f16;
  padding: 11px 15px;
  border-radius: 0 6px 6px 0;
  margin: 0 0 14px;
  font-size: 14.5px;
  max-width: 72ch;
}

/* ---- taxonomy ---- */
.rs-taxcat {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rs-navy-soft);
  margin: 30px 0 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rs-line);
}
.rs-taxcat:first-of-type { margin-top: 8px; }
.rs-tax {
  border: 1px solid var(--rs-line);
  border-left: 3px solid var(--rs-navy);
  border-radius: 7px;
  padding: 16px 18px;
  margin: 0 0 14px;
  background: var(--rs-paper);
  scroll-margin-top: 88px;
}
.rs-tax__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rs-tax__id {
  font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  background: var(--rs-navy);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: .02em;
}
.rs-tax__title { font-size: 16.5px; font-weight: 650; color: var(--rs-navy); }
.rs-tax p { margin: 0 0 9px; line-height: 1.58; font-size: 14.5px; }
.rs-tax__lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--rs-navy-soft); font-weight: 700; margin: 12px 0 5px;
}
.rs-tax__ev { margin: 0 0 9px; padding-left: 18px; }
.rs-tax__ev li { font-size: 14px; margin: 0 0 3px; line-height: 1.5; }
.rs-tax__maps { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.rs-map-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  background: var(--rs-panel);
  border: 1px solid var(--rs-line-soft);
  border-radius: 6px;
  padding: 9px 12px;
}
.rs-map-row__k { font-size: 12px; font-weight: 700; color: var(--rs-navy-soft); text-transform: uppercase; letter-spacing: .04em; }
.rs-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rs-chip {
  font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace;
  font-size: 12px;
  border: 1px solid var(--rs-line);
  background: var(--rs-paper);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--rs-navy);
}
.rs-chip__rat { display: block; font-family: inherit; font-size: 12.5px; color: var(--rs-muted); margin-top: 3px; line-height: 1.45; }
.rs-chip--group { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; }

/* ---- filter bar ---- */
.rs-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 18px;
  background: var(--rs-panel);
  border: 1px solid var(--rs-line);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.rs-filter { display: flex; flex-direction: column; gap: 5px; }
.rs-filter label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--rs-muted); font-weight: 700; }
.rs-filter select {
  font: inherit;
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--rs-line);
  border-radius: 6px;
  background: var(--rs-paper);
  color: var(--rs-ink);
  min-width: 200px;
}
.rs-filter__count { margin-left: auto; font-size: 13px; color: var(--rs-muted); align-self: center; }

/* ---- mapping table ---- */
.rs-tablewrap { overflow-x: auto; border: 1px solid var(--rs-line); border-radius: 8px; }
.rs-table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14px; }
.rs-table thead th {
  position: sticky;
  top: 0;
  background: var(--rs-navy);
  color: #fff;
  text-align: left;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  z-index: 1;
}
.rs-table td { border-top: 1px solid var(--rs-line); padding: 10px 12px; vertical-align: top; line-height: 1.5; }
.rs-table tbody tr:nth-child(even) td { background: var(--rs-panel); }
.rs-table__id { font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace; font-size: 12.5px; color: var(--rs-navy); white-space: nowrap; }
.rs-table__csf { font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace; font-size: 12.5px; color: var(--rs-ink); }
.rs-table tr[hidden] { display: none; }
.rs-empty { padding: 20px; text-align: center; color: var(--rs-muted); font-size: 14px; }

/* ---- evidence grid ---- */
.rs-ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rs-ev {
  border: 1px solid var(--rs-line);
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--rs-paper);
}
.rs-ev h3 { font-size: 15.5px; color: var(--rs-navy); margin: 0 0 7px; }
.rs-ev p { font-size: 14px; line-height: 1.5; margin: 0 0 10px; color: var(--rs-ink); }
.rs-ev__types { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.rs-ev__type { font-size: 12px; background: var(--rs-panel); border: 1px solid var(--rs-line-soft); border-radius: 4px; padding: 2px 7px; color: var(--rs-muted); }
.rs-ev__rel { font-size: 11.5px; color: var(--rs-navy-soft); font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace; }

/* ---- downloads ---- */
.rs-dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rs-dl {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  border: 1px solid var(--rs-line);
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--rs-paper);
  text-decoration: none;
  color: var(--rs-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rs-dl:hover { border-color: var(--rs-navy); box-shadow: 0 2px 10px rgba(22,50,79,.08); }
.rs-dl__fmt {
  flex: 0 0 auto;
  font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--rs-navy);
  border-radius: 5px;
  padding: 6px 9px;
  letter-spacing: .03em;
}
.rs-dl__body { min-width: 0; }
.rs-dl__label { font-size: 15px; font-weight: 650; color: var(--rs-navy); margin: 0 0 3px; }
.rs-dl__desc { font-size: 13.5px; line-height: 1.45; color: var(--rs-muted); margin: 0 0 4px; }
.rs-dl__size { font-size: 12px; color: var(--rs-muted); }

/* ---- misc tables + references + citation ---- */
.rs-vh { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.rs-vh th, .rs-vh td { border: 1px solid var(--rs-line); padding: 9px 12px; text-align: left; vertical-align: top; }
.rs-vh th { background: var(--rs-panel); color: var(--rs-navy); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.rs-refs { list-style: none; margin: 0; padding: 0; counter-reset: ref; }
.rs-refs li { counter-increment: ref; margin: 0 0 12px; padding-left: 30px; position: relative; font-size: 14.5px; line-height: 1.55; }
.rs-refs li::before { content: "[" counter(ref) "]"; position: absolute; left: 0; color: var(--rs-navy-soft); font-family: ui-monospace, monospace; font-size: 13px; }
.rs-refs .rs-ref-t { font-weight: 650; color: var(--rs-navy); }
.rs-refs a { color: var(--rs-link); word-break: break-word; }
.rs-cite { background: var(--rs-panel); border: 1px solid var(--rs-line); border-radius: 8px; padding: 15px 17px; font-size: 14.5px; line-height: 1.55; }
.rs-disclaimer { font-size: 13px; color: var(--rs-muted); line-height: 1.55; margin-top: 14px; border-top: 1px solid var(--rs-line-soft); padding-top: 12px; max-width: 78ch; }
.rs-publisher { margin-top: 10px; font-size: 14px; }
.rs-publisher a { color: var(--rs-link); text-decoration: none; }
.rs-publisher a:hover { text-decoration: underline; }

/* ---- research index cards ---- */
.rs-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin: 8px 0 40px; }
.rs-index-card {
  display: block;
  border: 1px solid var(--rs-line);
  border-top: 3px solid var(--rs-navy);
  border-radius: 8px;
  padding: 20px 22px;
  background: var(--rs-paper);
  text-decoration: none;
  color: var(--rs-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rs-index-card:hover { box-shadow: 0 3px 14px rgba(22,50,79,.1); }
.rs-index-card__type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--rs-navy-soft); font-weight: 700; }
.rs-index-card__title { font-size: 19px; font-weight: 680; color: var(--rs-navy); margin: 8px 0 8px; line-height: 1.25; }
.rs-index-card__sub { font-size: 14.5px; color: var(--rs-muted); line-height: 1.55; margin: 0 0 14px; }
.rs-index-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--rs-muted); }
.rs-index-card__meta strong { color: var(--rs-navy); font-weight: 600; }
.rs-index-empty { color: var(--rs-muted); font-size: 15px; }
/* Article-form index cards (research index lists each publication) */
.rs-index-card { display: flex; flex-direction: column; }
.rs-index-card__link { display: block; text-decoration: none; color: inherit; }
.rs-index-card__topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.rs-index-card__topic { font-size: 11.5px; color: var(--rs-navy-soft); background: var(--rs-panel); border: 1px solid var(--rs-line-soft); border-radius: 4px; padding: 2px 8px; }
.rs-index-card__meta { margin-bottom: 16px; }
.rs-index-card__cta { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--rs-navy); text-decoration: none; align-self: flex-start; }
.rs-index-card__cta:hover { text-decoration: underline; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .rs-layout { grid-template-columns: 1fr; gap: 0; }
  .rs-toc {
    position: static; max-height: none; overflow: visible;
    border-right: 0; border-bottom: 1px solid var(--rs-line);
    padding: 0 0 16px; margin-bottom: 24px;
  }
  .rs-toc ol { columns: 2; column-gap: 20px; }
}
@media (max-width: 560px) {
  .rs-toc ol { columns: 1; }
  .rs-map-row { grid-template-columns: 1fr; gap: 4px; }
  .rs-filter select { min-width: 0; width: 100%; }
  .rs-filter { flex: 1 1 100%; }
}

/* ---- AI RMF implementation-model page (additive; scoped classes not used
   by the CSF publication, so its rendering is unchanged) ---- */
.airmf-flow {
  font-family: ui-monospace, "IBM Plex Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 2;
  color: var(--rs-ink);
  background: var(--rs-panel);
  border: 1px solid var(--rs-line);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
}
.airmf-rel { color: var(--rs-navy-soft); font-weight: 600; }
.airmf-fieldlist { display: flex; flex-wrap: wrap; gap: 6px; }
.airmf-fieldlist .rs-chip { font-size: 12px; }
.airmf-m[hidden], .airmf-classhead[hidden] { display: none; }
