.rfpm-portal,
.rfpm-portal * { box-sizing: border-box; }

.rfpm-portal {
  --rfpm-green-900: #121912;
  --rfpm-green-800: #26321f;
  --rfpm-green-700: #314023;
  --rfpm-green-600: #52683a;
  --rfpm-gold: #ffe08a;
  --rfpm-gold-soft: #fff7df;
  --rfpm-ink: #1f241d;
  --rfpm-border: #d8ddd0;
  width: 100%;
  margin: 0;
  color: var(--rfpm-ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.rfpm-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(24px, 3vw, 38px) max(18px, calc((100vw - 1280px) / 2 + 24px));
  background: radial-gradient(circle at 88% 18%, rgba(255,227,154,.22), transparent 30%), linear-gradient(135deg, #52683a 0%, #2d3b25 48%, #121912 100%);
  color: #fff;
}

.rfpm-kicker { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: #ffe39a; font-weight: 900; }
.rfpm-title { margin: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08; color: #fff !important; font-weight: 900; text-shadow: 0 2px 8px rgba(0,0,0,.42); }
.rfpm-subtitle { margin: 10px 0 0; max-width: 950px; font-size: clamp(.95rem, 2vw, 1rem); color: #fff7df !important; }
.rfpm-inner { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }

.rfpm-intro { margin: 16px 0 12px; padding: 14px 16px; background: #f8f5ec; border: 1px solid #d9cda8; border-left: 5px solid #7a5a1b; border-radius: 12px; }
.rfpm-intro h2 { margin: 0 0 6px; color: #26321f; font-size: 1rem; font-weight: 900; }
.rfpm-intro p { margin: 4px 0; font-size: .93rem; }
.rfpm-intro a { color: #5b3b00; font-weight: 800; text-underline-offset: 2px; }

.rfpm-tools { display: grid; gap: 10px; margin: 14px 0; padding: 14px; background: #f7f8f5; border: 1px solid var(--rfpm-border); border-radius: 14px; box-shadow: 0 8px 18px rgba(0,0,0,.05); }
.rfpm-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.rfpm-search-label { min-width: 0; }
.rfpm-search-row input,
.rfpm-filter-row select { width: 100%; min-width: 0; height: 42px; padding: 0 13px; border: 1px solid #c7ccbe; border-radius: 9px; background: #fff; color: var(--rfpm-ink); font: inherit; font-size: .92rem; font-weight: 700; }
.rfpm-search-row input:focus,
.rfpm-filter-row select:focus { outline: 3px solid rgba(255,224,138,.72); outline-offset: 1px; border-color: #52683a; }
.rfpm-clear { min-width: 72px; height: 42px; padding: 0 14px; border: 1px solid #c7ccbe; border-radius: 9px; background: #fff; color: #26321f; font: inherit; font-size: .8rem; font-weight: 900; cursor: pointer; }
.rfpm-clear:hover { background: #26321f; color: #fff; }
.rfpm-clear:focus-visible, .rfpm-download:focus-visible { outline: 3px solid #ffcc33; outline-offset: 2px; }
.rfpm-filter-row { display: grid; grid-template-columns: minmax(170px, 205px) minmax(170px, 205px) 1fr; gap: 10px; align-items: center; }
.rfpm-filter-row label { min-width: 0; }
.rfpm-stats { justify-self: end; min-height: 38px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: linear-gradient(180deg,#314023,#24301b); border: 1px solid rgba(0,0,0,.18); border-radius: 999px; color: #d7dfcf; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.rfpm-stats strong { color: var(--rfpm-gold); font-size: 15px; font-weight: 900; }

.rfpm-table-shell { overflow: clip; background: #fff; border: 1px solid #dfe2dc; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.045); }
.rfpm-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0; background: #fff; }
.rfpm-table thead th { position: sticky; top: 0; z-index: 2; padding: 11px 10px; background: #26321f; color: #fff; border: 0; text-align: left; text-transform: uppercase; font-size: .72rem; letter-spacing: .045em; }

.rfpm-sort-button {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.rfpm-sort-button:focus-visible { outline: 2px solid #ffe08a; outline-offset: 3px; border-radius: 2px; }
.rfpm-sort-icon::before { content: "⇅"; opacity: .7; font-size: 11px; }
.rfpm-table th[aria-sort="ascending"] .rfpm-sort-icon::before { content: "▲"; color: #ffe08a; opacity: 1; }
.rfpm-table th[aria-sort="descending"] .rfpm-sort-icon::before { content: "▼"; color: #ffe08a; opacity: 1; }
.rfpm-mobile-sort { display: none; gap: 8px; min-width: 0; }
.rfpm-sort-direction { min-height: 42px; padding: 0 12px; border: 1px solid #c7ccbe; border-radius: 9px; background: #fff; color: #26321f; font: inherit; font-size: .78rem; font-weight: 900; cursor: pointer; }
.rfpm-sort-direction:hover { background: #26321f; color: #fff; }
.rfpm-sort-direction:focus-visible { outline: 3px solid rgba(255,224,138,.72); outline-offset: 1px; }

.rfpm-table tbody td { padding: 10px; border: 0; border-bottom: 1px solid #ecefec; vertical-align: middle; font-size: .89rem; }
.rfpm-table tbody tr:nth-child(even) { background: #fbfbfa; }
.rfpm-table tbody tr:hover { background: #eef4e9; }
.rfpm-table tbody tr[hidden] { display: none !important; }
.rfpm-category-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; padding: 5px 11px; border: 1px solid #d7ddcf; border-radius: 999px; background: #eef1ea; color: #26321f; font-size: .74rem; font-weight: 900; white-space: nowrap; }
.rfpm-number { font-weight: 900; color: #354225; white-space: nowrap; }
.rfpm-doc-title { min-width: 280px; font-weight: 800; color: #202020; }
.rfpm-tags { font-size: .78rem !important; font-weight: 800; color: #394332; }
.rfpm-date, .rfpm-size { white-space: nowrap; color: #555; font-size: .84rem !important; font-weight: 700; }
.rfpm-download-cell { text-align: right; white-space: nowrap; }
.rfpm-download { display: inline-flex; align-items: center; justify-content: center; min-width: 86px; min-height: 34px; padding: 0 12px; background: #2f3b22; color: #fff !important; border: 1px solid #26321f; border-radius: 7px; font-size: .78rem; font-weight: 900; line-height: 1; text-decoration: none !important; box-shadow: 0 2px 5px rgba(0,0,0,.11); }
.rfpm-download:hover { background: #536541; border-color: #536541; color: #fff !important; }
.rfpm-unavailable { color: #717171; font-size: .78rem; font-weight: 700; }
.rfpm-no-results, .rfpm-error { margin: 14px 0; padding: 16px; border: 1px solid #e1b5b5; border-radius: 12px; background: #fff3f3; font-weight: 800; }
.rfpm-no-results[hidden] { display: none !important; }

@media (max-width: 960px) {
  .rfpm-filter-row { grid-template-columns: 1fr 1fr; }
  .rfpm-stats { grid-column: 1 / -1; justify-self: stretch; }
}

@media (max-width: 880px) {
  .rfpm-mobile-sort { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .rfpm-mobile-sort label { min-width: 0; }
  .rfpm-mobile-sort select { width: 100%; }
  .rfpm-filter-row { grid-template-columns: 1fr 1fr; }
  .rfpm-mobile-sort { grid-column: 1 / -1; }
  .rfpm-stats { grid-column: 1 / -1; }

  .rfpm-table-shell { overflow: visible; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .rfpm-table { min-width: 0; display: block; background: transparent; }
  .rfpm-table thead { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
  .rfpm-table tbody { display: grid; gap: 10px; }
  .rfpm-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr); overflow: hidden; border: 1px solid #dfe2dc; border-radius: 12px; background: #fff !important; box-shadow: 0 4px 12px rgba(0,0,0,.045); }
  .rfpm-table tbody tr:hover { background: #fff !important; }
  .rfpm-table tbody td { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; align-items: start; min-width: 0; padding: 8px 11px; border-bottom: 1px solid #edf0eb; font-size: .86rem; text-align: left; white-space: normal; }
  .rfpm-table tbody td::before { content: attr(data-label); color: #66705f; font-size: .68rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
  .rfpm-table tbody td:last-child { border-bottom: 0; }
  .rfpm-category-pill { justify-self: start; min-width: 0; white-space: normal; text-align: center; }
  .rfpm-doc-title { min-width: 0; }
  .rfpm-download-cell { align-items: center !important; }
  .rfpm-download { justify-self: start; min-height: 38px; }
}

@media (max-width: 760px) {
  .rfpm-inner { width: min(100% - 24px, 1280px); }
  .rfpm-hero { padding-left: 16px; padding-right: 16px; }
  .rfpm-intro, .rfpm-tools { border-radius: 11px; }
  .rfpm-tools { padding: 11px; }
  .rfpm-filter-row { grid-template-columns: 1fr; }
  .rfpm-mobile-sort, .rfpm-stats { grid-column: auto; }
}

@media (max-width: 420px) {
  .rfpm-search-row { grid-template-columns: 1fr; }
  .rfpm-clear { width: 100%; }
  .rfpm-table tbody td { grid-template-columns: 78px minmax(0,1fr); padding-left: 10px; padding-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .rfpm-portal * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  .rfpm-tools, .rfpm-download, .rfpm-no-results { display: none !important; }
  .rfpm-hero { width: auto; margin: 0; padding: 12px 0; background: none !important; color: #000 !important; }
  .rfpm-title, .rfpm-subtitle, .rfpm-kicker { color: #000 !important; text-shadow: none; }
  .rfpm-inner { width: 100%; }
  .rfpm-table-shell { border: 0; box-shadow: none; }
  .rfpm-table thead th { position: static; background: #eee !important; color: #000 !important; }
}
