/* NNEMF additions. The files in /vendor/mel/css/ are the live mel stylesheets, unchanged. */

/* Group the nav, feed, and sidebar in the middle of a wide window. */
body.rfsx-page .rfsx-layout {
  width: min(1300px, 100%);
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

@media (min-width: 761px) {
  body.rfsx-page .rfsx-navlinks.rfsx-menu-mobile { display: none; }
}
@media (max-width: 760px) {
  body.rfsx-page .rfsx-navlinks.rfsx-menu-desktop { display: none; }
  body.rfsx-page .rfsx-nav.is-open {
    display: block;
    position: sticky;
    top: 0;
    z-index: 5;
    height: auto;
    max-height: 70vh;
    background: #000;
  }
}

html[data-theme="dark"],
html:not([data-theme="light"]) {
  color-scheme: dark;
}
html[data-theme="light"] {
  color-scheme: light;
}

@media (min-width: 761px) {
  body.rfsx-page form.rfsx-filters-desktop {
    display: grid;
    grid-template-columns: minmax(9.5rem, 1.5fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(8.4rem, 0.95fr);
    gap: 8px;
    align-items: center;
  }
  body.rfsx-page form.rfsx-filters-desktop button {
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
    padding: 10px 14px;
    min-height: 42px;
  }
}

.rfsx-filters-mobile { display: none; }
@media (max-width: 760px) {
  .rfsx-filters-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px 12px;
  }
  .rfsx-filters-mobile input,
  .rfsx-filters-mobile select,
  .rfsx-filters-mobile button {
    width: 100%;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
    padding: 8px 12px;
  }
}

/* Native menus follow the page theme. Closed controls stay pills. */
body.rfsx-page select {
  appearance: none;
  color-scheme: dark;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%23e7eef2' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 32px;
}
body.rfsx-page select option,
body.rfsx-page select optgroup {
  background-color: #12171b;
  color: #e7eef2;
}
body.rfsx-page select option:checked {
  background-color: #1d4f86;
  color: #ffffff;
}
body.rfsx-page select:focus-visible {
  outline: 2px solid #7fd0e4;
  outline-offset: 2px;
}
html[data-theme="light"] body.rfsx-page select {
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%23142028' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-theme="light"] body.rfsx-page select option,
html[data-theme="light"] body.rfsx-page select optgroup {
  background-color: #ffffff;
  color: #142028;
}
html[data-theme="light"] body.rfsx-page select option:checked {
  background-color: #0b6e8a;
  color: #ffffff;
}
html[data-theme="light"] body.rfsx-page select:focus-visible {
  outline-color: #0b6e8a;
}

html.js .rfsx-load-more { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rfsx-paper-steps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 4px; }
.rfsx-paper-step {
  border: 1px solid var(--border, #314049);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.rfsx-paper-step-status { margin: 0; color: var(--muted, #8b97a8); font-size: 13px; flex-basis: 100%; }
.rfsx-unpublish {
  margin-left: auto;
  border: 1px solid var(--border, #314049);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.rfsx-unpublish-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
}
.rfsx-unpublish-dialog {
  width: min(420px, 100%);
  border-radius: 16px;
  border: 1px solid var(--border, #314049);
  background: var(--bg, #12171b);
  color: inherit;
  padding: 16px;
}
.rfsx-unpublish-dialog h2 { margin: 0 0 8px; font-size: 1.05rem; }
.rfsx-unpublish-dialog p { margin: 0 0 12px; line-height: 1.4; }
.rfsx-unpublish-dialog label { display: grid; gap: 6px; font-size: 13px; }
.rfsx-unpublish-dialog input {
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border, #314049);
  background: transparent;
  color: inherit;
  padding: 8px 12px;
}
.rfsx-unpublish-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.rfsx-unpublish-actions button {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border, #314049);
  background: transparent;
  color: inherit;
  padding: 6px 12px;
  cursor: pointer;
}
.rfsx-more-status { color: var(--muted, #8b97a8); font-size: 13px; min-height: 1.2em; padding: 4px 0 18px; }
#rfsxSentinel { height: 1px; }
.rfsx-card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
}

html[data-theme="light"] body.rfsx-page {
  background: #f4f7f8;
  color: #142028;
  color-scheme: light;
}

html[data-theme="light"] body.rfsx-page {
  --text: #142028;
  --muted: #3d4c55;
  --border: #d5dbe0;
  --link: #0b6e8a;
  --panel: #fff;
}
html[data-theme="light"] body.rfsx-page .rfsx-topbar {
  background: rgba(244, 247, 248, 0.92);
}
html[data-theme="light"] body.rfsx-page .disclaimer,
html[data-theme="light"] body.rfsx-page .rfsx-paper-raw {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
html[data-theme="light"] body.rfsx-page .rfsx-card:hover,
html[data-theme="light"] body.rfsx-page .rfsx-navitem:hover {
  background: rgba(11, 110, 138, 0.06);
}
html[data-theme="light"] body.rfsx-page .rfsx-chip {
  border-radius: 999px;
  border: 1px solid #c5ced4;
  background: #fff;
  color: #142028;
}
html[data-theme="light"] body.rfsx-page .rfsx-chip:hover {
  background: rgba(11, 110, 138, 0.08);
}
html[data-theme="light"] body.rfsx-page .rfsx-chip-count {
  color: #3d4c55;
}
html[data-theme="light"] body.rfsx-page .rfsx-eff-harm { color: #8d1d1d; border-color: rgba(176, 48, 48, 0.45); background: rgba(210, 60, 60, 0.14); }
html[data-theme="light"] body.rfsx-page .rfsx-eff-mixed { color: #8a3148; border-color: rgba(196, 90, 114, 0.45); background: rgba(240, 138, 160, 0.18); }
html[data-theme="light"] body.rfsx-page .rfsx-eff-no_effect { color: #243038; border-color: rgba(80, 96, 104, 0.35); background: rgba(80, 96, 104, 0.08); }
html[data-theme="light"] body.rfsx-page .rfsx-eff-unclear { color: #7a5a08; border-color: rgba(184, 140, 20, 0.45); background: rgba(244, 197, 66, 0.22); }
html[data-theme="light"] body.rfsx-page .rfsx-eff-benefit { color: #1d6b32; border-color: rgba(47, 140, 68, 0.45); background: rgba(47, 179, 68, 0.14); }
html[data-theme="light"] body.rfsx-page .rfsx-eff-unknown { color: #3a4146; border-color: rgba(90, 98, 104, 0.4); background: rgba(120, 128, 134, 0.14); }
html[data-theme="light"] body.rfsx-page .rfsx-chips .rfsx-chip.is-selected {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Dark chips use the light hues at a higher tint so they stay readable on the black sidebar. */
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip .rfsx-chip-count,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip .rfsx-chip-count {
  color: inherit;
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-harm,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-harm {
  color: #ffd6d6;
  border-color: rgba(230, 96, 96, 0.85);
  background: rgba(210, 60, 60, 0.34);
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-mixed,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-mixed {
  color: #ffd0dc;
  border-color: rgba(240, 138, 160, 0.8);
  background: rgba(240, 138, 160, 0.28);
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-no_effect,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-no_effect {
  color: #d5dee6;
  border-color: rgba(148, 168, 184, 0.7);
  background: rgba(148, 168, 184, 0.22);
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unclear,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unclear {
  color: #ffe7a8;
  border-color: rgba(244, 197, 66, 0.75);
  background: rgba(244, 197, 66, 0.24);
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-benefit,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-benefit {
  color: #d6ffdd;
  border-color: rgba(47, 179, 68, 0.8);
  background: rgba(47, 179, 68, 0.28);
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unknown,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unknown {
  color: #e4e0da;
  border-color: rgba(176, 168, 156, 0.65);
  background: rgba(176, 168, 156, 0.2);
}
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-harm:hover,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-harm:hover { background: rgba(210, 60, 60, 0.48); }
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-mixed:hover,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-mixed:hover { background: rgba(240, 138, 160, 0.42); }
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-no_effect:hover,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-no_effect:hover { background: rgba(148, 168, 184, 0.34); }
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unclear:hover,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unclear:hover { background: rgba(244, 197, 66, 0.36); }
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-benefit:hover,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-benefit:hover { background: rgba(47, 179, 68, 0.42); }
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unknown:hover,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.rfsx-eff-unknown:hover { background: rgba(176, 168, 156, 0.32); }
html[data-theme="dark"] body.rfsx-page .rfsx-chips .rfsx-chip.is-selected,
html:not([data-theme="light"]) body.rfsx-page .rfsx-chips .rfsx-chip.is-selected {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (min-width: 1181px) {
  body.rfsx-page .rfsx-paper-layout {
    align-items: start;
  }
  body.rfsx-page .rfsx-paper-layout > .rfsx-nav,
  body.rfsx-page .rfsx-paper-layout > .rfsx-side {
    align-self: start;
    height: auto;
    max-height: none;
    overflow: visible;
    position: sticky;
    top: 0;
  }
}

.rfsx-paper-layout .rfsx-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rfsx-paper-article .rfsx-paper-authors {
  margin: 0 0 4px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  body.rfsx-page .rfsx-paper-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  body.rfsx-page .rfsx-paper-layout .rfsx-side {
    display: block;
    position: static;
    height: auto;
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.rfsx-page .rfsx-paper-layout {
    grid-template-columns: 1fr;
  }
  body.rfsx-page .rfsx-paper-layout .rfsx-side {
    grid-column: 1;
  }
  body.rfsx-page .rfsx-paper-layout .rfsx-toprow {
    flex-wrap: wrap;
  }
  body.rfsx-page .rfsx-paper-layout .rfsx-mini {
    display: inline-block;
  }
}

.about-prose {
  overflow-wrap: break-word;
}
.about-prose :is(h2, h3, h4, h5, h6) {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: .2px;
  margin: 18px 0 8px;
  font-size: 1.2rem;
}
.about-prose h3 { font-size: 1.05rem; }
.about-prose h1 + h3 { margin-top: 4px; }
.about-prose :is(h4, h5, h6) { font-size: 1rem; }
.about-prose p,
.about-prose li {
  line-height: 1.55;
  color: var(--text);
}
.about-prose p { margin: 8px 0 0; }
.about-prose ul,
.about-prose ol { margin: 8px 0 0; padding-left: 1.35rem; }
.about-prose li { margin: 0.4rem 0; }
.about-prose li p { margin: 6px 0 0; }
.about-prose ul ul,
.about-prose ol ol { margin-top: 4px; }
.about-prose blockquote {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--border);
  color: var(--muted, #8b97a8);
}
.rfsx-pagefoot {
  border-top: 1px solid var(--border);
  padding: 18px 20px 28px;
  color: var(--muted);
  text-align: center;
}
.rfsx-pagefoot a { color: var(--muted); text-decoration: none; }
.rfsx-pagefoot a:hover { text-decoration: underline; }
.about-prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
.about-prose a { color: var(--link); }
.about-prose strong { font-weight: 750; }
