/* VRI Hub styles: VRI red, black and white. */
:root {
  --red: #D82435; --red-dark: #B81D2C; --red-deep: #8E1420; --red-soft: #FDE7E9;
  --ink: #141414; --ink2: #3A3A3A; --muted: #555; --line: #E4E4E4; --line2: #BDBDBD;
  --bg: #F6F5F3; --card: #FFF; --ok: #1E6B3F; --ok-bg: #E7F3EC; --warn-bg: #FFF1DC; --warn: #5C3A00;
  --head: 'Montserrat', system-ui, sans-serif; --body: 'Source Sans 3', system-ui, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.45; color: var(--ink); background: var(--bg); }
a { color: var(--red-dark); } a:hover { color: var(--red-deep); }
h1, h2, h3 { font-family: var(--head); font-weight: 800; margin: 0 0 6px; line-height: 1.2; }
h1 { font-size: 30px; } h2 { font-size: 21px; } h3 { font-size: 17px; margin-top: 4px; }
.h2 { margin-top: 8px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #1F5FBF; outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.lead { font-size: 17px; color: var(--ink2); margin-bottom: 4px; }
.eyebrow { font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .18em; color: var(--red-dark); }
.boot, .loading { padding: 60px 20px; text-align: center; color: var(--muted); }

/* layout */
.wrap { max-width: 1280px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.main { padding-top: 28px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 20px; outline: none; }
.row { display: flex; align-items: center; } .row.gap { gap: 12px; } .between { justify-content: space-between; } .end { justify-content: flex-end; } .wrapx { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.grow > .tag, .grow > .badge { align-self: flex-start; }
.title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid2, .grid3, .grid4, .grid5 { display: grid; gap: 16px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid5 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.narrow { max-width: 720px; margin: 0 auto; width: 100%; } .narrow-l { max-width: 860px; }
hr { border: none; border-top: 1px solid var(--line); margin: 8px 0; }

/* header */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; height: 44px; color: #fff; text-decoration: none; flex: none; }
.logo-img { max-height: 40px; width: auto; }
.logo-text { font-family: var(--head); font-weight: 600; letter-spacing: .08em; font-size: 18px; } .logo-text b { color: var(--red); font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { color: #D6D6D6; text-decoration: none; font-weight: 600; font-size: 16px; padding: 11px 11px 8px; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; } .nav a.on { color: #fff; border-bottom-color: var(--red); }
.search { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; background: #262626; border-radius: 8px; color: #C9C9C9; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font-size: 15px; outline: none; }
.search:focus-within { outline: 3px solid #6E9BE8; }
.btn-help { height: 42px; padding: 0 18px; display: flex; align-items: center; background: var(--red); color: #fff; border-radius: 8px; font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-decoration: none; }
.btn-help:hover { background: var(--red-dark); color: #fff; } .btn-help.on { background: #fff; color: var(--red-dark); }
.me { display: flex; text-decoration: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 8px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }
.foot-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.demo-flag { position: fixed; left: 12px; bottom: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px; z-index: 30; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .02em; text-decoration: none; cursor: pointer; }
.btn:hover { color: #fff; filter: brightness(1.12); }
.btn.red { background: var(--red); border-color: var(--red); } .btn.red:hover { background: var(--red-dark); }
.btn.dark { background: var(--ink); }
.btn.white { background: #fff; color: var(--ink); border-color: #fff; } .btn.white:hover { color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line2); } .btn.ghost:hover { color: var(--ink); background: #F3F3F3; filter: none; }
.btn.small { min-height: 38px; padding: 0 12px; font-size: 13px; }
.btn.big { min-height: 50px; font-size: 15px; letter-spacing: .05em; }
.btn.danger, .linklike.danger { color: var(--red-deep); }
.btn:disabled { opacity: .6; cursor: wait; }
.linklike { background: none; border: 0; padding: 4px 0; color: var(--red-dark); text-decoration: underline; cursor: pointer; font-size: inherit; align-self: flex-start; min-height: 32px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.big { font-size: 16px; padding: 0 20px; }
.pill.check { position: relative; }
.pill.check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill.check:has(input:checked) { background: var(--red); color: #fff; border-color: var(--red); }
.pill.check:has(input:focus-visible) { outline: 3px solid #1F5FBF; outline-offset: 2px; }
.label { font-weight: 600; font-size: 15px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 14px 16px; border-radius: 10px; background: #fff; border: 2px solid #DADADA; cursor: pointer; }
.choice.on { border-color: var(--red); }

/* forms */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
label.row { flex-direction: row; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 8px; background: #fff; font-size: 16px; font-weight: 400; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--red); }
input[type=file] { font-size: 15px; font-weight: 400; }
.file-btn { flex-direction: row; cursor: pointer; }
.search input { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }

/* cards + content */
.card { background: var(--card); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card.empty { align-items: center; text-align: center; color: var(--muted); padding: 40px 24px; }
.card.dashed { border: 2px dashed var(--line2); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dark-card { background: var(--ink); color: #fff; } .dark-card .muted { color: #C9C9C9; }
.dark-card input, .dark-card textarea { background: #262626 !important; color: #fff; border-color: #5A5A5A !important; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 15px; color: var(--ink2); }
.note.ok { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid #DADADA; font-size: 13px; font-weight: 600; color: var(--ink); }
.tag.red { background: var(--red); border-color: var(--red); color: #fff; letter-spacing: .08em; font-weight: 700; }
.tag.red-soft { background: var(--red-soft); border-color: var(--red-soft); color: var(--red-deep); }
.tag.dark { background: var(--ink); color: #fff; border-color: var(--ink); align-self: flex-start; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
.avatar { border-radius: 999px; object-fit: cover; flex: none; background: #D6D2CC; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; border: 2px solid #fff; box-shadow: 0 0 0 1px #DADADA; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list-row:first-of-type { border-top: 0; }
.list-row.link { color: var(--ink); text-decoration: none; } .list-row.link:hover strong { color: var(--red-dark); }
.list-row.faded { opacity: .55; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-ic { width: 42px; height: 50px; border-radius: 6px; background: var(--red-soft); color: var(--red-deep); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }

/* home */
.announce { background: var(--ink); color: #fff; border-radius: var(--r); padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.announce strong { font-family: var(--head); font-size: 19px; } .announce span { color: #D6D6D6; }
.announce .grow { flex: 1 1 260px; }
.announce .grow span { color: #D6D6D6; } .announce a:not(.btn) { color: #fff; }
.banner { background: var(--red); color: #fff; border-radius: var(--r); padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; }
.banner .eyebrow { color: #fff; } .banner strong { font-family: var(--head); font-weight: 800; font-size: 25px; line-height: 1.2; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--red); color: var(--ink); transform: translateY(-1px); }
.tile strong { font-family: var(--head); font-size: 18px; }
.tile-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; }
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; }
.events li > div:last-child { display: flex; flex-direction: column; }
.ev-date { width: 58px; flex: none; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.ev-date span { font-size: 12px; font-weight: 700; color: var(--red-dark); letter-spacing: .08em; } .ev-date b { font-family: var(--head); font-size: 24px; }
.mini-post { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 8px; background: var(--bg); color: var(--ink); text-decoration: none; }
.mini-post .cat { font-size: 13px; font-weight: 700; color: var(--red-dark); }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a { min-height: 46px; display: flex; align-items: center; justify-content: center; text-align: center; border: 1px solid #DADADA; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 4px; }
.quick a:hover { border-color: var(--red); }
.refer { border: 2px solid var(--red); }
.bday { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid #2E2E2E; }
.tip { padding: 16px 18px; border-radius: 12px; background: #EDEBE7; font-size: 15px; color: var(--ink2); }
.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.social-item { display: flex; flex-direction: column; gap: 6px; }
.social-item iframe { width: 100%; height: 460px; border: 0; border-radius: 10px; background: var(--bg); }
.social-fallback { height: 200px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; color: var(--muted); }
.fb-page iframe { width: 100%; max-width: 500px; border: 0; border-radius: 10px; }

/* open houses */
.oh-addr { font-family: var(--head); font-size: 18px; }
.oh-photo { width: calc(100% + 48px); margin: -24px -24px 4px; height: 190px; object-fit: cover; border-radius: var(--r) var(--r) 0 0; max-width: none; }
.price { font-weight: 700; color: var(--red-dark); font-size: 17px; }
.oh .btn { margin-top: auto; }

/* board */
.post.pinned { border: 2px solid var(--red); }
.post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-body { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.comments { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; align-items: flex-start; } .comment .grow { gap: 0; overflow-wrap: anywhere; }

/* resources */
.training .thumb { aspect-ratio: 16/9; background: var(--ink); color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-family: var(--head); font-weight: 700; font-size: 17px; }
.faq { border-top: 1px solid var(--line); } .faq:first-child { border-top: 0; }
.faq-q { width: 100%; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: none; border: 0; padding: 12px 0; text-align: left; font-weight: 600; font-size: 18px; cursor: pointer; }
.faq-q span:last-child { color: var(--red-dark); font-size: 24px; }
.faq-a { padding: 0 0 16px; color: var(--ink2); }
.brand { display: flex; flex-direction: column; gap: 6px; }
.brand-tile { aspect-ratio: 4/3; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-weight: 600; }
.brand-tile.dark { background: var(--ink); color: #fff; }
.brand-tile img { max-height: 100%; object-fit: contain; }
.sys { color: var(--ink); text-decoration: none; border: 1px solid #DADADA; } .sys:hover { border-color: var(--red); color: var(--ink); }

/* directory */
.person .tags, .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.big-name { font-family: var(--head); font-size: 18px; }
.filters { gap: 14px; }
.filters label.row input { width: 200px; }

/* help */
.staff { gap: 6px; }

/* admin */
.admin { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.admin-menu { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; background: #fff; border-radius: var(--r); padding: 10px; position: sticky; top: 90px; }
.admin-menu button { text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; min-height: 42px; }
.admin-menu button:hover { background: var(--bg); } .admin-menu button.on { background: var(--ink); color: #fff; }
.admin-body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* sign in */
.auth-bg { min-height: 100vh; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 18px; gap: 20px; }
.auth-card { width: 100%; max-width: 410px; background: #fff; border-radius: 16px; padding: 34px 30px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 24px; }
.auth-logo { display: flex; justify-content: center; } .auth-logo .logo-text { color: var(--ink); font-size: 22px; } .auth-logo img { max-height: 64px; }
.auth-foot { color: #A8A8A8; font-size: 13px; }

/* dialogs */
dialog.modal { border: 0; padding: 0; border-radius: 16px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; }
dialog.modal.wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(20, 20, 20, .72); }
.pad { padding: 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.popup .video, .video { aspect-ratio: 16/9; width: 100%; background: var(--ink); display: block; }
.video iframe { width: 100%; height: 100%; border: 0; }
.popup > .btn { margin: 16px 26px 0; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 100; transition: transform .25s; max-width: calc(100vw - 32px); }
#toast.show { transform: translateX(-50%) translateY(0); } #toast.bad { background: var(--red-deep); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 26px; }
  .nav { order: 5; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .search { order: 4; flex-basis: 100%; }
  .top-row { gap: 10px; }
  .btn-help { margin-left: auto; }
  .card { padding: 18px; }
  .oh-photo { width: calc(100% + 36px); margin: -18px -18px 4px; }
  .admin-menu { position: static; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; }
  .top { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
