/* NAEJOBS - RHTP funding dashboard (test/rhtp.html + js/rhtp.js). Its own small stylesheet: the jobs page's app.css locks the page to one
   screen, this page scrolls like a normal page. Colors follow app.css. */
:root {
    --bg: #f4f6f9; --panel: #fff; --ink: #14263a; --muted: #5f7285; --line: #e3e8ef;
    --brand: #1f6b4f; --navy: #0a2847; --blue: #2563eb; --amber: #f59e0b; --amber-ink: #8a5300;
    --g0: #e4ebe6; --g1: #b5dcc3; --g2: #6dbb8f; --g3: #1f7a55;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--blue); }
button, select { font: inherit; }

/* ---- top bar (same look as the jobs page) ---- */
.rh-top { position: sticky; top: 0; z-index: 50; height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: var(--navy); color: #fff; }
.rh-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: .2px; white-space: nowrap; }
.rh-top-t { flex: 1 1 auto; min-width: 0; font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-back { color: #fff; text-decoration: none; font-size: 13px; border: 1px solid rgba(255, 255, 255, .25); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.rh-back:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .45); }
.rh-brand:focus-visible, .rh-back:focus-visible { outline: 2px solid #8ce0b8; outline-offset: 2px; }

.rh-main { max-width: 1320px; margin: 0 auto; padding: 18px 18px 28px; }
.rh-intro h1 { margin: 0 0 4px; font-size: 24px; line-height: 1.2; color: var(--navy); }
.rh-lede { margin: 0 0 14px; max-width: 880px; color: #2b3f55; font-size: 15px; }
.rh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.rh-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.rh-stat b { display: block; font-size: 22px; line-height: 1.15; color: var(--navy); }
.rh-stat span { color: var(--muted); font-size: 12.5px; }
.rh-stat.is-open b { color: var(--brand); }

.rh-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -4px 0 16px; }
.rh-tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #9fbfdf; background: #fff; color: #1e4f7a; border-radius: 999px; padding: 6px 13px;
    font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.rh-tool:hover { border-color: var(--blue); background: #f4f8fd; }
.rh-tools-n { color: var(--muted); font-size: 12.5px; }
/* all-states finder: search + tabs */
.rh-find { position: relative; margin: 6px 0 8px; }
.rh-find svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--blue); pointer-events: none; }
.rh-q { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1.5px solid #79a9da; border-radius: 999px; font-size: 14px; color: var(--ink); background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.rh-q:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .2); }
.rh-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.rh-tab { border: 1px solid #cfd9e3; background: #fff; color: #33506b; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rh-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.rh-aw-st { font-weight: 800; color: #1e4f7a; margin-right: 6px; }
.rh-cal { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 700; font-size: 12.5px; color: #1e4f7a; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.rh-cal:hover { text-decoration: underline; }
.rh-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
.rh-mapcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px; }
.rh-maptools { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.rh-pick-l { font-weight: 700; font-size: 13px; color: #1e4f7a; }
.rh-pick { height: 34px; border: 1.5px solid #9fbfdf; border-radius: 999px; padding: 0 30px 0 12px; background: #fff; color: var(--ink); min-width: 190px; cursor: pointer; }
.rh-pick:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.rh-map { position: relative; }
.rh-map svg { display: block; width: 100%; height: auto; }
.rh-loading { padding: 80px 0; text-align: center; color: var(--muted); }
.rh-st { stroke: #fff; stroke-width: 1; cursor: pointer; transition: filter .12s; }
.rh-st:hover, .rh-st:focus { filter: brightness(.93); outline: none; }
.rh-st:focus-visible { stroke: var(--blue); stroke-width: 2.5; }
.rh-st.is-sel { stroke: var(--navy); stroke-width: 2.6; }
.rh-st.c0 { fill: var(--g0); } .rh-st.c1 { fill: var(--g1); } .rh-st.c2 { fill: var(--g2); } .rh-st.c3 { fill: var(--g3); }
.rh-up { fill: var(--amber); stroke: #fff; stroke-width: 1.5; pointer-events: none; }
.rh-lbl { font: 700 10px var(--font); fill: #22384d; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.rh-lbl.on-dark { fill: #fff; }
/* the small Northeast states as tappable chips (they are tiny on the map) */
.rh-small { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.rh-chip { border: 1px solid #cfd9e3; background: #fff; border-radius: 999px; padding: 3px 9px 3px 6px; font-size: 12px; font-weight: 700; color: #22384d; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; }
.rh-chip i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.rh-chip:hover { border-color: #8fb0cf; }
.rh-chip.is-sel { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.rh-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.rh-leg-t { font-weight: 700; color: #22384d; }
.rh-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.rh-c0 { background: var(--g0); } .rh-c1 { background: var(--g1); } .rh-c2 { background: var(--g2); } .rh-c3 { background: var(--g3); }
.rh-legend i.rh-dot { background: var(--amber); border-radius: 50%; }
.rh-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--navy); color: #fff; border-radius: 8px; padding: 6px 9px; font-size: 12.5px; line-height: 1.35;
    box-shadow: 0 4px 14px rgba(10, 40, 71, .3); max-width: 240px; }
.rh-tip[hidden] { display: none; }
.rh-tip b { display: block; font-size: 13px; }

/* ---- the panel: all states (default) or one state ---- */
.rh-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; position: sticky; top: 60px; max-height: calc(100vh - 72px);
    overflow-y: auto; overscroll-behavior: contain; }
.rh-panel:focus { outline: none; }
.rh-ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.rh-ph h2 { margin: 0; font-size: 20px; line-height: 1.2; color: var(--navy); }
.rh-all-btn { flex: 0 0 auto; border: 1px solid #cfd9e3; background: #fff; color: #1e4f7a; border-radius: 999px; padding: 4px 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rh-all-btn:hover { border-color: #8fb0cf; }
.rh-meta { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.rh-meta b { color: var(--brand); }
.rh-how { margin: 0 0 10px; color: #2b3f55; }
.rh-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.rh-btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid #9fbfdf; color: #1e4f7a; background: #f4f8fd; }
.rh-btn.is-main { background: var(--brand); border-color: var(--brand); color: #fff; }
.rh-btn:hover { filter: brightness(1.06); text-decoration: underline; }
.rh-note { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: #f6f8fb; border-left: 3px solid #b8c7d6; color: #34495e; font-size: 13px; }
.rh-note.is-limited { border-left-color: var(--amber); background: #fff9ec; }
.rh-sec { margin: 14px 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #1e4f7a; }
.rh-sec small { font-weight: 700; color: var(--muted); letter-spacing: 0; }
.rh-none { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.rh-item { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin: 0 0 8px; background: #fff; }
.rh-item.is-open { border-left: 4px solid var(--brand); }
.rh-item.is-up { border-left: 4px solid var(--amber); }
.rh-it { font-weight: 700; color: var(--ink); line-height: 1.3; }
.rh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: 12.5px; color: #3c5166; }
.rh-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 1px 7px; border-radius: 999px; text-transform: uppercase; }
.rh-tag.open { background: #dcf3e6; color: #155a3c; }
.rh-tag.rolling { background: #e6f4ec; color: #155a3c; border: 1px dashed #5fae86; }
.rh-tag.upcoming { background: #fdf0d5; color: var(--amber-ink); }
.rh-tag.closed { background: #edf0f3; color: #5f7285; }
.rh-st-tag { font-weight: 800; color: #1e4f7a; background: #eaf2fb; border-radius: 5px; padding: 0 5px; cursor: pointer; border: 0; font-size: 11.5px; }
.rh-due { font-weight: 700; }
.rh-due.soon { color: #b42318; }
.rh-amt { font-weight: 700; color: #1d4f3a; }
.rh-who { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.rh-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 700; font-size: 13px; text-decoration: none; }
.rh-go:hover { text-decoration: underline; }
.rh-go small { font-weight: 600; color: var(--muted); }
.rh-aw { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rh-aw:last-child { border-bottom: 0; }
.rh-aw-to { font-weight: 700; }
.rh-aw-amt { font-weight: 800; color: #1d4f3a; text-align: right; white-space: nowrap; }
.rh-aw-what { grid-column: 1 / -1; font-size: 12.5px; color: #3c5166; }
.rh-aw-what a { font-weight: 700; text-decoration: none; margin-left: 4px; white-space: nowrap; }
.rh-aw-what a:hover { text-decoration: underline; }
.rh-closed summary { cursor: pointer; font-weight: 700; color: #1e4f7a; margin: 12px 0 6px; font-size: 13px; }
.rh-more { border: 1px solid #cfd9e3; background: #fff; color: #1e4f7a; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; margin: 4px 0 0; }

.rh-foot { margin: 22px 0 0; color: var(--muted); font-size: 12.5px; max-width: 900px; }
.rh-foot p { margin: 4px 0; }

/* ---- phone ---- */
@media (max-width: 900px) {
    .rh-main { padding: 14px 12px 24px; }
    .rh-intro h1 { font-size: 20px; }
    .rh-lede { font-size: 14px; }
    .rh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rh-stat { padding: 8px 11px; }
    .rh-stat b { font-size: 19px; }
    .rh-grid { grid-template-columns: minmax(0, 1fr); }
    .rh-mapcard { padding: 10px 10px 10px; }
    .rh-maptools { flex-wrap: wrap; }
    .rh-pick { flex: 1 1 auto; height: 42px; font-size: 16px; }   /* 16px: smaller makes an iPhone zoom in */
    .rh-panel { position: static; max-height: none; overflow: visible; scroll-margin-top: 56px; }
    .rh-top-t { display: none; }
    .rh-lbl { display: none; }
}
@media (max-width: 380px) { .rh-brand { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .rh-st { transition: none; } }

/* every fact: "Verify" (the page that states it - official where one exists) + "More info", each naming its publisher */
.rh-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 7px; }
.rh-src { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; font-size: 12.5px; max-width: 100%; }
.rh-src-l { font-weight: 800; color: var(--blue); white-space: nowrap; }
.rh-src-by { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rh-src.is-verify .rh-src-l { color: #15603f; }
.rh-src.is-verify .rh-src-l::before { content: "\2713  "; }
.rh-src:hover .rh-src-l { text-decoration: underline; }
.rh-src.is-inline { display: inline-flex; font-size: 12px; }
.rh-aw-srcs { grid-column: 1 / -1; margin-top: 3px; }
.rh-tag.new { background: #e0ecff; color: #1d4ed8; }
.rh-tag.tech { background: #efe7fb; color: #5b2d9c; }
/* status that moves week to week: awarded rounds (with their winners), "updated" dates */
.rh-tag.awarded { background: #ede9fe; color: #5b21b6; }
.rh-item.is-awarded { border-left: 4px solid #7c3aed; }
.rh-tag.tech { background: #e0f2f1; color: #0f766e; }
.rh-win { margin-top: 5px; font-size: 12.5px; color: #3c2a63; background: #f7f4fe; border-radius: 7px; padding: 5px 8px; }
.rh-upd { font-size: 11.5px; color: #1d4ed8; font-weight: 700; }
