/* GIST Connect — styled to sit alongside gistforumusa.org
   Tokens taken from the main site: Inter + Poppins, GIST blue #003889,
   saffron eyebrow #F2A13A, soft grey-blue page, 16px rounded bordered cards. */
:root {
  --blue: #003889; --blue-2: #0a4aa6; --blue-tint: #ecf3fa;
  --saffron: #f2a13a; --saffron-ink: #9a5a0c; --saffron-tint: #fdf3e6;
  --red: #c8102e;
  --ink: #111b28; --heading: #2c2f45; --text: #4a5160; --muted: #757a86;
  --line: #dfe5ec; --bg: #f7fafc; --card: #fff;
  --green: #1f7a4a; --green-tint: #e6f4ec; --danger: #b42318; --danger-tint: #fdecea;
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 0 4px 0 #dfe5ec;
  --head: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "Poppins", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--head); color: var(--text); background: var(--bg); }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); color: var(--heading); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 600; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.eyebrow { display: block; color: var(--saffron); font: 600 12px/1.4 var(--head); letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: 10px; }
.accent { color: var(--blue); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; padding-bottom: 56px; }

/* Utility strip linking back to the main site */
.strip { background: var(--blue); color: #dbe6f6; font-size: .82rem; }
.strip .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.strip a { color: #fff; text-decoration: none; }
.strip a:hover { text-decoration: underline; }

/* Header — white, logo left, Poppins nav, outlined uppercase buttons (as on gistforumusa.org) */
header.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; gap: 22px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 46px; width: auto; display: block; }
.brand .wordmark { font: 800 1.5rem/1 var(--head); color: var(--red); letter-spacing: -.02em; }
.brand .product { font: 600 .78rem/1 var(--ui); color: var(--blue); background: var(--blue-tint); border-radius: 999px; padding: 6px 10px; letter-spacing: .3px; }
nav.main { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav.main a { font: 400 15px/1 var(--ui); color: var(--ink); text-decoration: none; padding: 10px 10px; border-radius: 10px; }
nav.main a:hover { color: var(--blue); }
nav.main a.active { color: var(--blue); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; font-size: .9rem; flex-wrap: wrap; }
.userbox a { color: var(--ink); text-decoration: none; }
.userbox a:hover { color: var(--blue); }
.outline-btn { font: 400 13.5px/1 var(--head); letter-spacing: .5px; text-transform: uppercase; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; background: #fff; text-decoration: none; cursor: pointer; }
.outline-btn:hover { border-color: var(--blue); color: var(--blue); }
.badge-dot { background: var(--saffron); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: .74rem; margin-left: 4px; font-weight: 600; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { color: var(--blue); }

/* Flash */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--green-tint); color: var(--green); border-color: #bfe3cd; }
.flash.error { background: var(--danger-tint); color: var(--danger); border-color: #f6c9c4; }

/* Cards & layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.two-col { display: grid; gap: 24px; grid-template-columns: 2fr 1fr; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section { margin-top: 44px; }

/* Stat tiles — same treatment as the main site's 300+ / 25K+ boxes */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 14px; text-align: center; }
.stat b { display: block; font: 600 1.6rem/1.1 var(--head); color: var(--blue); }
.stat span, .stat a { font-size: .74rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.stat a:hover { color: var(--blue); }

/* Offer cards */
.offer h3 a { text-decoration: none; color: var(--heading); }
.offer h3 a:hover { color: var(--blue); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--muted); margin: 8px 0 10px; }
.meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line); margin-right: 7px; vertical-align: middle; }
.pill { display: inline-block; background: var(--saffron-tint); color: var(--saffron-ink); border-radius: 999px; padding: 2px 11px; font: 600 .76rem/1.6 var(--ui); }
.vpill { display: inline-block; background: var(--blue-tint); color: var(--blue); border-radius: 999px; padding: 2px 11px; font: 600 .76rem/1.6 var(--ui); text-decoration: none; }
a.vpill:hover { background: #dbe8f6; }
.tag { display: inline-block; background: #f1f4f8; color: var(--text); border-radius: 8px; padding: 2px 9px; font-size: .8rem; margin: 2px 4px 2px 0; }
.status { display: inline-block; border-radius: 999px; padding: 2px 10px; font: 600 .76rem/1.6 var(--ui); }
.status.pending { background: #fff4d6; color: #8a6200; }
.status.accepted, .status.open { background: var(--green-tint); color: var(--green); }
.status.declined, .status.closed { background: var(--danger-tint); color: var(--danger); }
.status.withdrawn { background: #eef0f3; color: var(--muted); }

/* Forms */
form.stack label { display: block; font-weight: 600; color: var(--heading); margin: 14px 0 6px; font-size: .95rem; }
form.stack .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
.row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* Buttons — filled GIST blue primary, white outlined secondary (as on the main site) */
.btn { display: inline-block; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: var(--radius); padding: 11px 20px; font: 600 14px/1.2 var(--ui); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn.accent { background: var(--blue); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); font-weight: 400; }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn.good { background: var(--green); border-color: var(--green); }
.btn.bad { background: #fff; color: var(--danger); border-color: #f0c2bd; }
.btn.bad:hover { background: var(--danger-tint); }
.btn.sm { padding: 7px 12px; font-size: .84rem; border-radius: var(--radius-sm); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.filters { display: grid; gap: 12px; grid-template-columns: 2fr 1.3fr 1.3fr 1fr 1fr 1fr auto; align-items: end; }
.filters label { font-size: .74rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 5px; letter-spacing: .6px; text-transform: uppercase; }
@media (max-width: 1000px) { .filters { grid-template-columns: 1fr 1fr; } }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* Landing hero — mirrors the main site's "Science meets purpose" block */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; padding: 26px 0 10px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; }
.hero p.lead { font-size: 1.08rem; max-width: 600px; }
.hero .stats { margin: 0; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 24px; } }
.steps .card { position: relative; padding-top: 26px; }
.steps .num { font: 700 .8rem/1 var(--ui); color: var(--saffron); letter-spacing: 1.5px; }
.vgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.vcard { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; text-decoration: none; color: var(--heading); font-weight: 600; font-size: .95rem; }
.vcard:hover { border-color: var(--blue); color: var(--blue); }
.vcard small { color: var(--muted); font-weight: 400; font-size: .8rem; white-space: nowrap; }
.band { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.band p { margin: 4px 0 0; max-width: 640px; }
.notice { background: var(--saffron-tint); border: 1px solid #f6dcb6; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; color: var(--ink); }
.notif { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread a { font-weight: 700; }
.empty { color: var(--muted); padding: 12px 0; margin: 0; }
pre.note { white-space: pre-wrap; font: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 6px 0 0; }

/* Footer — same three columns as gistforumusa.org */
footer.site { background: #f8fafc; border-top: 1px solid var(--line); margin-top: 20px; }
footer.site .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 28px; padding-top: 44px; padding-bottom: 30px; }
footer.site h4 { font: 700 1.05rem/1.2 var(--head); color: #000; margin: 0 0 14px; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 0 0 8px; }
footer.site a { color: #1a202c; text-decoration: none; font-size: .95rem; }
footer.site a:hover { color: var(--blue); }
footer.site .blurb { font-size: .9rem; color: var(--muted); max-width: 300px; }
footer.site .legal { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 22px; font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

/* Phones: logo + account on one line, nav as a single swipeable row */
@media (max-width: 760px) {
  header.top { position: static; }
  header.top .wrap { gap: 8px 12px; padding-top: 10px; padding-bottom: 6px; justify-content: space-between; }
  .brand img { height: 38px; }
  nav.main { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; }
  nav.main a { white-space: nowrap; padding: 8px 8px; }
  .userbox { gap: 8px; }
  .outline-btn { padding: 7px 10px; font-size: 12px; }
  .strip span { display: none; }
  .card { padding: 18px; }
}

/* ---- v3: people, programs, auth ---- */
.outline-btn.solid { background: var(--blue); border-color: var(--blue); color: #fff; }
.outline-btn.solid:hover { background: var(--blue-2); color: #fff; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; object-fit: cover; flex: none; background: var(--blue-tint); color: var(--blue); font: 700 1rem/1 var(--head); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.avatar.sm { width: 40px; height: 40px; font-size: .85rem; }
.avatar.md { width: 56px; height: 56px; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.4rem; }
.avatar.xl { width: 160px; height: 160px; font-size: 2.6rem; border-width: 4px; }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; text-decoration: none; color: var(--heading); }
.who.big { margin: 0; gap: 14px; }
.person { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: var(--text); }
.person:hover { border-color: var(--blue); }
.person h3 { margin: 4px 0 2px; color: var(--heading); }
.profile-head { display: flex; gap: 28px; align-items: center; }
.profile-head h1 { margin: 2px 0 4px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.photo-row { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.card.compact { padding: 16px 20px; margin-bottom: 12px; }
.match { display: grid; grid-template-columns: 220px 1fr auto; gap: 16px; align-items: center; }
.match .who { margin: 0; }
.warn { color: #8a6200; }
.two-col.even { grid-template-columns: 1fr 1fr; }
.band-inline { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font: 400 14px/1 var(--ui); border: 1px solid transparent; }
.tabs a.active { border-color: var(--line); background: #fff; color: var(--blue); font-weight: 600; }
.auth { max-width: 520px; margin: 16px auto; }
.auth.wide { max-width: 760px; }
fieldset.group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 18px 18px; margin: 18px 0 0; }
fieldset.group legend { font: 600 .8rem/1 var(--head); color: var(--saffron-ink); letter-spacing: 1px; text-transform: uppercase; padding: 0 6px; }
[hidden] { display: none !important; }
ol.choices { padding-left: 20px; margin: 6px 0 16px; } ol.choices li { margin-bottom: 4px; }
.status.submitted, .status.under_review { background: #fff4d6; color: #8a6200; }
.status.waitlisted { background: var(--blue-tint); color: var(--blue); }
.status.draft { background: #eef0f3; color: var(--muted); }

/* Front page */
.vision { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; position: relative; overflow: hidden; }
.vision::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--saffron), #fff 50%, #138808); opacity: .9; }
.vision-lead { margin: 0 0 12px; color: var(--heading); font-weight: 600; }
.vision ol { list-style: none; counter-reset: v; margin: 0; padding: 0; }
.vision li { counter-increment: v; position: relative; padding: 12px 0 12px 46px; border-top: 1px solid var(--line); }
.vision li:first-child { border-top: 0; }
.vision li::before { content: counter(v, decimal-leading-zero); position: absolute; left: 0; top: 13px; font: 700 .9rem/1 var(--ui); color: var(--blue); background: var(--blue-tint); border-radius: 10px; padding: 8px 7px; }
.vision li b { display: block; color: var(--heading); }
.vision li span { font-size: .93rem; color: var(--muted); }
.programs { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 18px; margin-top: 18px; }
.program { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; display: flex; flex-direction: column; align-items: flex-start; }
.program h3 { font-size: 1.35rem; margin: 12px 0 6px; }
.program p { margin: 0 0 12px; }
.program .btn { margin-top: auto; }
.program.soon { background: transparent; border-style: dashed; box-shadow: none; }
.ext-link { margin-top: auto; font-size: .92rem; }
ul.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
ul.ticks li { position: relative; padding: 5px 0 5px 26px; color: var(--ink); }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.door { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.door b { font: 700 1.1rem/1.2 var(--head); color: var(--heading); }
.door em { font-style: normal; color: var(--blue); font-weight: 600; margin-top: 6px; font-size: .92rem; }
.door:hover { border-color: var(--blue); }
@media (max-width: 960px) { .programs, .doors { grid-template-columns: 1fr; } .two-col.even { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .match { grid-template-columns: 1fr; } .profile-head { flex-direction: column; align-items: flex-start; } .avatar.xl { width: 120px; height: 120px; } }

/* Admin "view as" bar */
.viewas { background: var(--saffron-tint); border-bottom: 1px solid #f6dcb6; font-size: .88rem; color: var(--ink); }
.viewas .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.viewas form { display: flex; align-items: center; gap: 8px; }
.viewas label { font-weight: 600; }
.viewas select { width: auto; padding: 5px 10px; font-size: .86rem; }

/* ---- v5: verticals, buckets, filters, approval, calendar ---- */
.vchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 6px; }
.vcheck { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 400 !important; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; cursor: pointer; font-size: .92rem; }
.vcheck input { width: auto; margin: 0; accent-color: var(--blue); }
.vcheck:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 22px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font: 400 14px/1 var(--ui); }
.chip span { color: var(--muted); font-size: .8rem; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip.active span { color: #dbe6f6; }
.bucket { margin-bottom: 30px; }
.bucket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 2px solid var(--line); margin-bottom: 14px; padding-bottom: 6px; }
.bucket-head h2 { margin: 0; }
.match-filters { grid-template-columns: 1.3fr 1.3fr 1.2fr 1.2fr 1fr 1fr 1fr auto; }
.filter-actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1100px) { .match-filters { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) { .match-filters { grid-template-columns: 1fr 1fr; } }
.cal-filters { grid-template-columns: 1.4fr 1.4fr 1.4fr auto; }
@media (max-width: 760px) { .cal-filters { grid-template-columns: 1fr; } }
ol.progress { list-style: none; display: flex; gap: 0; padding: 0; margin: 10px 0 16px; counter-reset: p; }
ol.progress li { flex: 1; position: relative; padding: 22px 6px 0; font-size: .82rem; color: var(--muted); text-align: center; counter-increment: p; }
ol.progress li::before { content: counter(p); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: #eef0f3; color: var(--muted); font: 600 .72rem/20px var(--ui); z-index: 1; }
ol.progress li::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--line); }
ol.progress li:first-child::after { display: none; }
ol.progress li.done { color: var(--green); } ol.progress li.done::before { background: var(--green); color: #fff; content: "✓"; }
ol.progress li.now { color: var(--ink); font-weight: 600; } ol.progress li.now::before { background: var(--saffron); color: #fff; }
.status.review { background: #fff4d6; color: #8a6200; }
.status.not_approved { background: var(--danger-tint); color: var(--danger); }
.card.review { border-color: #f6dcb6; background: #fffbf4; }
.benefits .card h3 { margin-bottom: 4px; } .benefits .card p { margin: 0; }

/* Date-range picker */
.drp-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: #fff; margin-top: 4px; }
.drp-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drp-hint { font-size: .85rem; color: var(--muted); }
.drp-nav { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.drp-nav:hover { border-color: var(--blue); color: var(--blue); }
.drp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .drp-months { grid-template-columns: 1fr; } }
.drp-title { font: 600 .95rem/1 var(--head); color: var(--heading); text-align: center; margin-bottom: 8px; }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.drp-dow { font-size: .7rem; color: var(--muted); text-align: center; padding: 4px 0; text-transform: uppercase; letter-spacing: .5px; }
.drp-day { position: relative; border: 0; background: transparent; border-radius: 8px; height: 34px; cursor: pointer; font: 400 .88rem/1 var(--head); color: var(--ink); }
.drp-day:hover { background: var(--blue-tint); }
.drp-day.past { color: #b4bac4; }
.drp-day.today { box-shadow: inset 0 0 0 1px var(--blue); }
.drp-day.in { background: var(--blue-tint); color: var(--blue); border-radius: 0; }
.drp-day.start, .drp-day.end { background: var(--blue); color: #fff; border-radius: 8px; }
.drp-day.marked::after { content: ""; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--saffron); }
.drp-legend { font-size: .8rem; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.drp-swatch { width: 7px; height: 7px; border-radius: 50%; background: var(--saffron); display: inline-block; }
.drp-inputs { margin-top: 6px; }
.drp-inputs label { margin-top: 6px !important; }

/* Availability calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.cal-head h2 { margin: 0; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow div { padding: 8px; font: 600 .74rem/1 var(--head); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); }
.cal-day { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-row .cal-day:last-child { border-right: 0; }
.cal-day.out { background: #fafbfc; } .cal-day.out .cal-num { color: #c2c7cf; }
.cal-day.sel { background: #fff8ec; box-shadow: inset 0 0 0 2px var(--saffron); }
.cal-num { font: 600 .82rem/1 var(--head); color: var(--ink); margin-bottom: 2px; }
.cal-day.today .cal-num { background: var(--blue); color: #fff; border-radius: 999px; padding: 3px 7px; align-self: flex-start; }
.cal-chip { display: block; font-size: .74rem; line-height: 1.25; padding: 3px 6px; border-radius: 6px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cal-more { font-size: .72rem; color: var(--muted); }
.cal-dot { width: 12px; height: 12px; border-radius: 4px; flex: none; margin-top: 6px; }
.cal-item { display: flex; gap: 12px; align-items: flex-start; }
.sel-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--saffron); background: #fff8ec; vertical-align: -2px; margin-right: 4px; }
.c0 { background: #003889; } .c1 { background: #c2410c; } .c2 { background: #0f766e; } .c3 { background: #7c3aed; }
.c4 { background: #b45309; } .c5 { background: #be185d; } .c6 { background: #1d4ed8; } .c7 { background: #4d7c0f; }
@media (max-width: 760px) { .cal-day { min-height: 70px; padding: 4px; } .cal-chip { font-size: .66rem; padding: 2px 4px; } .cal-dow div { padding: 6px 2px; font-size: .62rem; letter-spacing: 0; } }
/* layout fixes */
.match-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .match-filters { grid-template-columns: 1fr 1fr; } }
.cal-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { min-width: 0; }

/* Requests listed under each availability entry, and the expert's schedule */
.subreqs { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.subreqs-head { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.subreq { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0 8px 14px; border-left: 3px solid var(--line); margin-left: 2px; }
.subreq + .subreq { border-top: 1px dashed var(--line); }
.subreq-main { min-width: 0; }
.subreq .status { white-space: nowrap; flex-shrink: 0; }
table.schedule td.nowrap { white-space: nowrap; }
table.schedule tr.past td { opacity: .6; }
@media (max-width: 600px) { .subreq { flex-direction: column; align-items: flex-start; gap: 4px; } table.schedule td.nowrap { white-space: normal; } }
.pill.sip { background: var(--blue-tint); color: var(--blue); }
.notice .linkbtn, form.small .linkbtn { color: var(--blue); text-decoration: underline; }
.stages { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 4px; color: var(--muted); }
.stage { display: inline-flex; align-items: center; }
.stage + .stage::before { content: "→"; margin: 0 8px; color: var(--line-strong, #b8c2cf); }
.stage.done { color: var(--green); }
.stage.now { color: #8a6200; font-weight: 600; }
.stage.stop { color: var(--danger); }
