/* TSC Program Finder — all rules are scoped to .tscpf / .tscpf-* so they don't touch the tsc-core theme. */
.tscpf, .tscpf-dlg {
	--tscpf-navy: #003c71; --tscpf-navy2: #003c71; --tscpf-orange: #f6892b; --tscpf-orange-ink: #a0521a;
	--tscpf-bg: #f5f7fa; --tscpf-card: #fff; --tscpf-ink: #14202e; --tscpf-muted: #5b6878; --tscpf-line: #dde3ea; --tscpf-soft: #eef2f7;
	color: var(--tscpf-ink); line-height: 1.5; font-size: 16px;
}
.tscpf *, .tscpf-dlg * { box-sizing: border-box; }
.tscpf h2, .tscpf h3, .tscpf h4, .tscpf-dlg h2, .tscpf-dlg h3, .tscpf-dlg h4 { font-family: inherit; text-transform: none; letter-spacing: normal; }
.tscpf button, .tscpf-dlg button { font: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: normal; box-shadow: none; }
.tscpf-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tscpf-notice { padding: 14px 16px; border-left: 4px solid #f6892b; background: #fff7f0; }

/* hero */
.tscpf-hero { background: linear-gradient(135deg, #003c71, #002a50); color: #fff; padding: 28px 20px 72px; border-radius: 16px; }
.tscpf .tscpf-h { color: #fff; font-size: clamp(26px, 5vw, 40px); line-height: 1.1; margin: 0 0 8px; font-weight: 800; letter-spacing: -.01em; }
.tscpf-intro { margin: 0; max-width: 680px; font-size: clamp(15px, 2.2vw, 18px); opacity: .92; color: #fff; }
.tscpf-stats { display: flex; gap: 24px; margin-top: 16px; flex-wrap: wrap; }
.tscpf-stats b { display: block; font-size: 24px; color: var(--tscpf-orange); line-height: 1.2; }
.tscpf-stats span { font-size: 13px; opacity: .85; }

/* filters */
.tscpf-filters { position: relative; background: var(--tscpf-card); border: 1px solid var(--tscpf-line); border-radius: 16px; padding: 14px; box-shadow: 0 10px 30px rgba(0,30,60,.12); margin: -52px 12px 0; }
.tscpf-hero + .tscpf-filters { margin-top: -52px; }
.tscpf > .tscpf-filters:first-child { margin: 0; }
.tscpf-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tscpf-search { flex: 1 1 260px; position: relative; margin: 0; }
.tscpf-search svg { position: absolute; left: 12px; top: 15px; opacity: .5; }
.tscpf input[type=search], .tscpf select, .tscpf-dlg .tscpf-fld { width: 100%; height: 48px; border: 1px solid var(--tscpf-line); border-radius: 10px; padding: 0 14px; font: inherit; font-size: 16px; background: var(--tscpf-bg); color: var(--tscpf-ink); margin: 0; }
.tscpf input[type=search] { padding-left: 40px; }
.tscpf-selwrap { flex: 0 1 260px; margin: 0; }
.tscpf-toggle { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border: 1px solid var(--tscpf-line); border-radius: 10px; background: var(--tscpf-bg); font-size: 15px; font-weight: 600; white-space: nowrap; margin: 0; }
.tscpf-toggle input { width: 20px; height: 20px; accent-color: var(--tscpf-orange); margin: 0; }
.tscpf-chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tscpf-chips::-webkit-scrollbar { display: none; }
.tscpf .tscpf-chip { flex: 0 0 auto; border: 1px solid var(--tscpf-line); background: var(--tscpf-card); color: var(--tscpf-ink); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; min-height: 42px; }
.tscpf .tscpf-chip[aria-pressed="true"] { background: var(--tscpf-navy); border-color: var(--tscpf-navy); color: #fff; }
.tscpf-chip small { font-weight: 500; opacity: .7; margin-left: 5px; font-size: 12px; }
.tscpf-explain { margin: 16px 0 0; padding: 12px 16px; border-left: 4px solid var(--tscpf-orange); background: var(--tscpf-card); border-radius: 0 10px 10px 0; font-size: 15px; color: var(--tscpf-muted); }
.tscpf-explain strong { color: var(--tscpf-ink); }
.tscpf-meta { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; font-size: 14px; color: var(--tscpf-muted); gap: 12px; flex-wrap: wrap; }
.tscpf .tscpf-linkbtn { background: none; border: 0; color: var(--tscpf-navy2); font-weight: 600; text-decoration: underline; padding: 0; }

/* cards */
.tscpf-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding-bottom: 20px; }
@media (min-width: 560px) { .tscpf-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 900px) { .tscpf-grid { grid-template-columns: repeat(3, 1fr); } }
.tscpf .tscpf-card { display: flex; flex-direction: column; background: var(--tscpf-card); border: 1px solid var(--tscpf-line); border-radius: 14px; overflow: hidden; text-align: left; color: inherit; padding: 0; width: 100%; transition: transform .15s, box-shadow .15s; }
.tscpf .tscpf-card:hover, .tscpf .tscpf-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,30,60,.14); outline: none; background: var(--tscpf-card); color: inherit; }
.tscpf .tscpf-card:focus-visible { box-shadow: 0 0 0 3px var(--tscpf-orange); }
.tscpf-img { display: block; aspect-ratio: 40/21; width: 100%; background: linear-gradient(135deg, #1a5a96, #003c71) center/cover no-repeat; }
.tscpf-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; width: 100%; }
.tscpf-area { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tscpf-orange-ink); }
.tscpf-name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.tscpf-sub { font-size: 13px; color: var(--tscpf-muted); }
.tscpf-badges, .tscpf-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tscpf-badge { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--tscpf-soft); border: 1px solid var(--tscpf-line); color: var(--tscpf-muted); }
.tscpf-badge.tscpf-on { background: #e7f6ec; border-color: #b6e2c4; color: #1d6b3a; }
@media (max-width: 559px) {
	.tscpf .tscpf-card { flex-direction: row; }
	.tscpf-img { aspect-ratio: auto; width: 96px; flex: 0 0 96px; }
	.tscpf-body { padding: 10px 12px; }
	.tscpf-name { font-size: 15px; }
	.tscpf-hero { border-radius: 0; margin: 0 -16px; }
	.tscpf-filters { margin-left: 0; margin-right: 0; }
}
.tscpf-empty { text-align: center; padding: 40px 16px; color: var(--tscpf-muted); grid-column: 1 / -1; }
.tscpf-source { font-size: 13px; color: var(--tscpf-muted); margin: 8px 0 24px; }

/* buttons */
.tscpf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 700; text-decoration: none !important; border: 2px solid transparent; font-size: 15px; line-height: 1.2; }
.tscpf-btn.tscpf-p { background: var(--tscpf-orange); color: var(--tscpf-navy); }
.tscpf-btn.tscpf-p:hover { background: #f79a4a; color: var(--tscpf-navy); }
.tscpf-btn.tscpf-s { border-color: var(--tscpf-navy2); color: var(--tscpf-navy2); background: transparent; }
.tscpf-btn.tscpf-g { background: var(--tscpf-soft); color: var(--tscpf-ink); }
.tscpf-btn.tscpf-sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.tscpf-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* dialog (moved to <body> by the script) */
.tscpf-dlg { border: 0; padding: 0; border-radius: 18px; width: min(860px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.tscpf-dlg::backdrop { background: rgba(5,20,40,.55); }
@media (max-width: 640px) { .tscpf-dlg { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92dvh; } }
.tscpf-dhead { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--tscpf-line); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; z-index: 2; }
.tscpf-dtitle { flex: 1; }
.tscpf-dlg h2 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--tscpf-ink); }
.tscpf-dlg .tscpf-x { border: 0; background: var(--tscpf-soft); color: var(--tscpf-ink); width: 40px; height: 40px; border-radius: 10px; font-size: 22px; line-height: 1; flex: 0 0 auto; padding: 0; }
.tscpf-dlg .tscpf-back { border: 0; background: none; color: var(--tscpf-navy2); font-weight: 700; padding: 0 0 4px; display: block; }
.tscpf-dbody { padding: 16px; }
.tscpf-links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tscpf-award { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--tscpf-line); flex-wrap: wrap; }
.tscpf-links + .tscpf-award { border-top: 0; }
.tscpf-nm { font-weight: 700; font-size: 15px; }
.tscpf-ac { display: flex; gap: 8px; flex-wrap: wrap; }
.tscpf-note { font-size: 14px; color: var(--tscpf-muted); background: var(--tscpf-soft); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.tscpf-facts { margin: 0 0 12px; padding: 0; }
.tscpf-purpose { margin: 0 0 12px; }
.tscpf-terms { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .tscpf-terms { grid-template-columns: 1fr 1fr; } }
.tscpf-term { border: 1px solid var(--tscpf-line); border-radius: 12px; overflow: hidden; }
.tscpf-dlg .tscpf-term h4 { margin: 0; padding: 8px 12px; background: var(--tscpf-soft); font-size: 14px; display: flex; justify-content: space-between; gap: 8px; color: var(--tscpf-ink); }
.tscpf-term table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0; }
.tscpf-term td { padding: 6px 12px; border: 0; border-top: 1px solid var(--tscpf-line); vertical-align: top; background: none; }
.tscpf-term td:first-child { white-space: nowrap; font-weight: 600; width: 1%; }
.tscpf-term td:last-child { text-align: right; width: 1%; }
.tscpf-term tr.tscpf-or td { color: var(--tscpf-muted); font-style: italic; padding: 2px 12px; }
.tscpf-term tr.tscpf-or + tr td { border-top: 0; }
.tscpf-total { font-weight: 800; font-size: 16px; margin: 14px 0 4px; }
.tscpf-careers { margin: 4px 0; }
.tscpf-pk { margin: 0; padding: 0; list-style: none; }
.tscpf-pk li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--tscpf-line); margin: 0; }
.tscpf-pk li:first-child { border-top: 0; }
.tscpf-form { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }
@media (min-width: 600px) { .tscpf-form { grid-template-columns: 1fr 1fr; } .tscpf-wide { grid-column: 1 / -1; } }
.tscpf-form label { font-size: 13px; font-weight: 600; color: var(--tscpf-muted); margin: 0; }

/* packet tray */
.tscpf-tray { position: fixed; left: 0; right: 0; bottom: 0; background: var(--tscpf-navy); color: #fff; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; justify-content: space-between; z-index: 9990; box-shadow: 0 -6px 20px rgba(0,0,0,.2); transform: translateY(110%); transition: transform .2s; }
.tscpf-tray.tscpf-show { transform: none; }
.tscpf-tray b { font-size: 16px; color: #fff; }
.tscpf-tray-sub { font-size: 13px; opacity: .85; }
.tscpf-tray-btns { display: flex; gap: 8px; }
.tscpf-tray .tscpf-btn.tscpf-g { background: rgba(255,255,255,.14); color: #fff; }

/* print */
#tscpf-print { display: none; }
@media print {
	@page { size: letter; margin: .5in; }
	body.tscpf-printing { background: #fff !important; padding: 0 !important; margin: 0 !important; }
	body.tscpf-printing > *:not(#tscpf-print) { display: none !important; }
	body.tscpf-printing #tscpf-print { display: block; color: #000; font-family: Arial, Helvetica, sans-serif; }
	#tscpf-print .tscpf-pg { page-break-after: always; break-after: page; font-size: 10.5pt; line-height: 1.35; }
	#tscpf-print .tscpf-pg:last-child { page-break-after: auto; break-after: auto; }
	#tscpf-print .tscpf-ph { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid #f6892b; padding-bottom: 8px; margin-bottom: 12px; }
	#tscpf-print .tscpf-logo { height: .62in; width: auto; display: block; }
	#tscpf-print .tscpf-yr { text-align: right; }
	#tscpf-print .tscpf-yr { font-size: 9pt; color: #444; }
	#tscpf-print h1, #tscpf-print h3, #tscpf-print th, #tscpf-print td { font-family: Arial, Helvetica, sans-serif; }
	#tscpf-print h1 { font-weight: 700; font-size: 18pt; margin: 0 0 2px; color: #003c71; line-height: 1.15; }
	#tscpf-print .tscpf-pfacts { font-size: 10pt; color: #333; margin-bottom: 8px; }
	#tscpf-print .tscpf-pfacts b { color: #003c71; }
	#tscpf-print .tscpf-ppurp { margin: 0 0 10px; }
	#tscpf-print .tscpf-pterms { columns: 2; column-gap: 18px; }
	#tscpf-print .tscpf-pterm { break-inside: avoid; margin: 0 0 10px; }
	#tscpf-print .tscpf-pterm h3 { font-size: 10pt; margin: 0 0 3px; background: #e8eef5; border-left: 3px solid #f6892b; padding: 3px 6px; display: flex; justify-content: space-between; }
	#tscpf-print table { width: 100%; border-collapse: collapse; font-size: 9pt; }
	#tscpf-print td, #tscpf-print th { padding: 2px 6px; border-bottom: 1px solid #ddd; vertical-align: top; text-align: left; }
	#tscpf-print .tscpf-pterm td:first-child { white-space: nowrap; font-weight: 600; width: 1%; }
	#tscpf-print .tscpf-pterm td:last-child { text-align: right; width: 1%; }
	#tscpf-print tr.tscpf-or td { border: 0; font-style: italic; color: #555; }
	#tscpf-print .tscpf-pfoot { display: flex; gap: 14px; align-items: center; border-top: 1px solid #ccc; margin-top: 10px; padding-top: 8px; font-size: 8.5pt; color: #333; break-inside: avoid; }
	#tscpf-print .tscpf-pfoot svg { width: 84px; height: 84px; flex: 0 0 84px; }
	#tscpf-print .tscpf-pcareers { font-size: 9.5pt; margin: 6px 0; }
	#tscpf-print .tscpf-cover h1 { font-size: 26pt; }
	#tscpf-print .tscpf-cover table { margin-top: 14px; font-size: 10.5pt; }
	#tscpf-print .tscpf-cover th { color: #003c71; }
	#tscpf-print .tscpf-cover td, #tscpf-print .tscpf-cover th { padding: 6px; border-bottom: 1px solid #ccc; }
	#tscpf-print .tscpf-lines div { border-bottom: 1px solid #999; height: 26px; margin-top: 6px; font-size: 9pt; color: #555; }
}

/* Recruitment email form */
.tscpf #tscpf-email-form label, .tscpf-dlg #tscpf-email-form label {display:block;margin:12px 0;font-weight:600;}
.tscpf-dlg #tscpf-email-form .tscpf-fld {display:block;width:100%;max-width:500px;margin-top:5px;padding:10px;border:1px solid #aeb7c0;border-radius:5px;}
.tscpf-dlg #tscpf-email-form .tscpf-consent {display:flex;align-items:flex-start;gap:9px;font-weight:400;}
.tscpf-dlg #tscpf-email-form .tscpf-consent input {margin-top:4px;}
.tscpf-honeypot {position:absolute!important;left:-99999px!important;width:1px!important;height:1px!important;opacity:0!important;}

/* v1.2.1: make saved-program actions discoverable */
.tscpf-list-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:12px 0; }
.tscpf-list-tools #tscpf-list-notice:not([hidden]) { color:#003c71; font-weight:700; font-size:14px; }
.tscpf-list-tools [hidden] { display:none!important; }
.tscpf-tray { flex-wrap:wrap; }
.tscpf-tray-btns { flex-wrap:wrap; }
@media (max-width:520px) { .tscpf-tray { gap:6px; padding:8px 12px calc(8px + env(safe-area-inset-bottom)); } .tscpf-tray b { font-size:14px; } .tscpf-tray-sub { font-size:11px; } .tscpf-tray-btns .tscpf-btn { font-size:12px; padding:8px 10px; } }
