:root {
	--tp-accent: #ff7412;
	--tp-accent-deep: #f97316;
	--ma-accent: #f97316;
	--ma-accent-deep: #ea580c;
	--tp-bg: #f7f8fb;
	--tp-card: #ffffff;
	--tp-line: #e5e7eb;
	--tp-text: #111827;
	--tp-muted: #6b7280;
	--tp-nav-height: 70px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body.home-training-programmes {
	margin: 0;
	overflow-x: hidden;
}

.tp-page {
	width: 100%;
	max-width: none;
	min-height: 100vh;
	min-height: 100svh;
	min-height: 100dvh;
	margin: 0;
	background: var(--tp-bg);
	color: var(--tp-text);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
	padding-bottom: calc(var(--tp-nav-height) + 24px);
	padding-bottom: calc(var(--tp-nav-height) + env(safe-area-inset-bottom) + 24px);
	background-color: #fff;
}

.tp-main {
	padding-bottom: calc(24px + var(--tp-nav-height));
	padding-bottom: calc(24px + var(--tp-nav-height) + env(safe-area-inset-bottom));
}

.tp-page.is-filter-loading .tp-main {
	opacity: .72;
	pointer-events: none;
	transition: opacity .18s ease;
}

.tp-page--zh {
	font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
}

.tp-statusbar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 44px;
	padding: 0 28px;
	font-size: 13px;
	font-weight: 700;
	background: #ffffff;
}

.tp-statusbar__time {
	justify-self: start;
}

.tp-statusbar__notch {
	width: 118px;
	height: 30px;
	border-radius: 999px;
	background: #1f1f1f;
}

.tp-statusbar__signal {
	justify-self: end;
	width: 16px;
	height: 12px;
	display: block;
}

.tp-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px 10px;
	position: sticky;
	top: 0;
	z-index: 5;
	background: #ffffff;
}

.tp-page--zh .tp-header {
	padding: 12px 16px 13px;
	border-bottom: 1px solid #e5e7eb;
}

.tp-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}

.tp-brand__logo {
	height: 30px;
	width: auto;
	display: block;
	flex: 0 0 auto;
}

.tp-suggest {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid #fdba74;
	background: #fef3e2;
	color: #c2410c;
	font-size: 10px;
	line-height: 1;
	font-weight: 700;
	text-decoration: none;
}

.tp-page--zh .tp-suggest {
	min-height: 30px;
	padding: 0 13px;
	font-size: 11px;
}

.tp-bell img,
.tp-bottom-nav a img,
.tp-bottom-nav__plus img {
	display:block;
}

.tp-bell {
	width: 24px;
	height: 24px;
	border: 0;
	display:flex;
	align-items:center;
	justify-content:center;
	background: transparent;
}

.tp-bell img { width:24px; height:24px; }

.tp-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding: 14px 16px;
	background: linear-gradient(180deg, var(--tp-accent) 0%, #ff7b17 100%);
	color: #ffffff;
}

.tp-page--zh .tp-stats {
	margin-top: 0;
	padding: 14px 16px;
	border-radius: 0;
	background: linear-gradient(138deg, #f97316 0%, #ea580c 100%);
}

.tp-stats article {
	text-align: center;
	position: relative;
}

.tp-stats article + article::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	width: 1px;
	height: 34px;
	background: rgba(255,255,255,.35);
}

.tp-stats strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
	height: 27px;
}

.tp-stats span {
	font-size: 11px;
	font-weight: 400;
	height: 13px;
    display: block;
}

.tp-page--zh .tp-stats span {
	color: rgba(255,255,255,.85);
}

.tp-subsidy-banner {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: start;
	padding: 11px 14px 12px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-top: 0;
	border-radius: 0 0 16px 16px;
	color: #047857;
}

.tp-page--zh .tp-subsidy-banner {
	gap: 8px;
	align-items: center;
	padding: 8px 16px 9px;
	border-color: #6ee7b7;
	border-radius: 0;
}

.tp-page--zh .tp-subsidy-banner > div {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1 1 auto;
	min-width: 0;
	flex-wrap: wrap;
}

.tp-subsidy-banner strong {
	display: block;
	font-size: 13px;
	line-height: 1.25;
	font-weight: 800;
	margin-bottom: 3px;
}

.tp-page--zh .tp-subsidy-banner strong,
.tp-page--zh .tp-subsidy-banner p {
	display: inline;
	margin: 0;
	font-size: 11px;
	line-height: 1.3;
}

.tp-page--zh .tp-subsidy-banner strong {
	font-weight: 700;
	color: #065f46;
}

.tp-subsidy-banner p {
	margin: 0;
	font-size: 11px;
	line-height: 1.35;
}

.tp-page--zh .tp-subsidy-banner p {
	color: #047857;
}

.tp-subsidy-banner a {
	white-space: nowrap;
	color: #059669;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.tp-page--zh .tp-subsidy-banner a {
	font-size: 11px;
}

.tp-controls {
	background-color: #fff;
	border: 1px solid #E5E7EB;
	padding: 10px 16px;
    gap: 8px;
    display: grid;
}

.tp-page--zh .tp-controls {
	padding-top: 10px;
	padding-bottom: 11px;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
}

.tp-sort-tabs,
.tp-category-row {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.tp-sort-tabs::-webkit-scrollbar,
.tp-category-row::-webkit-scrollbar {
	display: none;
}

.tp-sort-pill,
.tp-category-pill,
.tp-filter-link {
	border: 0;
	border-radius: 999px;
	padding: 8px 14px;
	background: #eef0f4;
	color: #4b5563;
	font-size: 12px;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
}

.tp-page--zh .tp-sort-pill,
.tp-page--zh .tp-category-pill,
.tp-page--zh .tp-filter-link {
	padding: 5px 12px;
	font-size: 11px;
}

.tp-sort-pill.is-active,
.tp-category-pill.is-active {
	background: var(--tp-accent);
	color: #ffffff;
	font-weight: 700;
}

.tp-filter-link {
	margin-left: auto;
	display:inline-flex;
	align-items: center;
	background: #ffffff;
	box-shadow: inset 0 0 0 1px #d1d5db;
	color: #000;
	font-weight: 700;
}

.tp-page--zh .tp-filter-link {
	gap: 4px;
	padding: 6px 11px;
}

.tp-page--zh .tp-category-row {
	margin-top: 8px;
	padding-bottom: 2px;
}

.tp-category-pill.is-active {
	background: #111827;
}

.tp-audience-switch {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px;
	padding: 3px;
	border-radius: 10px;
	background: #eef0f4;
}

.tp-page--zh .tp-audience-switch {
	max-width: none;
	margin-top: 8px;
	border-radius: 10px;
	background: #f3f4f6;
	padding: 3px;
}

.tp-audience-switch a,
.tp-audience-switch button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 8px;
	padding:6px;
	background: transparent;
	color: #6b7280;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.tp-page--zh .tp-audience-switch a,
.tp-page--zh .tp-audience-switch button {
	padding: 6px 12px;
	font-size: 12px;
}

.tp-audience-switch a.is-active,
.tp-audience-switch button.is-active {
	background: #ffffff;
	color: #F97316;
	font-weight: 600;
}

.tp-page--zh .tp-audience-switch a.is-active,
.tp-page--zh .tp-audience-switch button.is-active {
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.tp-results {
	padding: 8px 16px 4px 16px;
	font-size: 13px;
	line-height: 1.4;
	color: #6b7280;
	margin: 0px;
}

.tp-page--zh .tp-results {
	margin: 8px 0 4px;
	padding: 0 16px;
	font-size: 12px;
	line-height: 1.35;
}

.tp-results strong {
	color: #111827;
	font-weight: 700;
}

.tp-message {
	margin: 0 16px 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fff1f2;
	color: #b42318;
	font-size: 12px;
	line-height: 1.45;
}

.tp-message.hidden {
	display: none;
}

.tp-card-list {
	display: grid;
	gap: 12px;
	padding: 8px 16px calc(72px + var(--tp-nav-height));
	padding: 8px 16px calc(72px + var(--tp-nav-height) + env(safe-area-inset-bottom));
}

.tp-page--zh .tp-card-list {
	gap: 10px;
	padding: 0 16px calc(72px + var(--tp-nav-height));
	padding: 0 16px calc(72px + var(--tp-nav-height) + env(safe-area-inset-bottom));
}

.tp-card {
	padding: 8px 16px;
	border-radius: 16px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	box-shadow: 0 3px 10px rgba(15,23,42,.025);
}

.tp-card[data-url] {
	cursor: pointer;
}

.tp-page--zh .tp-card {
	padding: 15px;
	border-radius: 14px;
	box-shadow: none;
}

.tp-empty-state {
	padding: 18px 16px;
	border-radius: 14px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	color: #4b5563;
	text-align: center;
}

.tp-empty-state strong {
	display: block;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 800;
	color: #111827;
}

.tp-empty-state p {
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.5;
}

.tp-card.is-highlight {
	border-color: #6ee7b7;
}

.tp-card__head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	column-gap: 9px;
	align-items: start;
}

.tp-card__badge {
	width: 44px;
	height: 44px;
	border-radius: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 800;
	flex: 0 0 44px;
}

.tp-card__badge.is-community {
	background: #f0fdf4;
	color: #16a34a;
}

.tp-card.is-suggestion {
	border-left: 4px solid #16a34a;
	background: #f9fafb;
}

.tp-card.is-suggestion .tp-card__flag {
	background: #16a34a;
	color: #ffffff;
}

.tp-card.is-suggestion .tp-interest {
	display: none;
}

.tp-page--zh .tp-card__badge {
	width: 42px;
	height: 42px;
	flex-basis: 42px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 900;
}

.tp-card__badge.is-zf { background: #fff1e5; color: var(--tp-accent); }
.tp-card__badge.is-hh { background: #ede9fe; color: #7c3aed; }
.tp-card__badge.is-rc { background: #dcfce7; color: #047857; }

.tp-card__title-wrap {
	min-width: 0;
	flex: 1 1 auto;
}

.tp-card__title-wrap h2 {
	margin: 0;
	font-size: 14px;
	line-height: 1.28;
	font-weight: 800;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.tp-page--zh .tp-card__title-wrap h2 {
	font-size: 13px;
	line-height: 1.3;
}

.tp-card__title-wrap p {
	margin: 3px 0 0;
	font-size: 12px;
	line-height: 1.25;
	color: var(--tp-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tp-page--zh .tp-card__title-wrap p {
	margin-top: 2px;
}

.tp-card__flags {
	grid-column: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.tp-card__flag {
	padding: 3px 7px;
	border-radius: 999px;
	background: #FEF9C3;
	color: #92400E;
	font-size: 10px;
	line-height: 1.1;
	font-weight: 700;
	white-space: nowrap;
	height: 18px;
	min-width: 72px;
	width: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tp-card__flag--ended {
	background: #F3F4F6;
	color: #6B7280;
}

.tp-page--zh .tp-card__flag {
	padding: 3px 7px;
	font-size: 10px;
}

/* Rating row */
.tp-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}

.tp-card__stars {
	color: #F5A623;
	font-size: 14px;
	letter-spacing: 1px;
	line-height: 1;
}

.tp-card__score {
	font-weight: 700;
	font-size: 14px;
	color: #111827;
}

.tp-card__count {
	color: #6b7280;
	font-size: 12px;
}

.tp-card__chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-top: 9px;
}

.tp-page--zh .tp-card__chips {
	margin-top: 8px;
}

.tp-card__chips span {
	padding: 4px 9px;
	border-radius: 999px;
	background: #f3f4f6;
	font-size: 11px;
	line-height: 1.2;
	color: #4b5563;
}

.tp-page--zh .tp-card__chips span {
	padding: 3px 9px;
	font-size: 11px;
	font-weight: 500;
}

.tp-card__chips span.is-fee {
	background: #dcfce7;
	color: #047857;
}

.tp-card__chips span.is-free {
	background: #d1fae5;
	color: #065f46;
	font-weight: 700;
}

.tp-card__chips span.is-place {
	background: #dbeafe;
	color: #2563eb;
}

.tp-card__chips span.is-location {
	background: #ede9fe;
	color: #6d28d9;
}

.tp-card__chips span.is-pdf {
	background: #fff1f2;
	color: #be123c;
	font-weight: 700;
}

.tp-card__desc {
	margin: 11px 0 0;
	width: 100%;
	font-size: 12px;
	line-height: 1.55;
	color: #4b5563;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.tp-page--zh .tp-card__desc {
	margin-top: 8px;
	line-height: 1.5;
}

.tp-card__notice {
	margin-top: 9px;
	width: 100%;
	padding: 9px 11px;
	border-radius: 12px;
	background: #ecfdf5;
	color: #059669;
	font-size: 11px;
	line-height: 1.35;
}

.tp-page--zh .tp-card__notice {
	border-radius: 8px;
	padding: 6px 10px;
}

.tp-card__footer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 12px;
	align-items: center;
	margin-top: 11px;
	font-size: 11px;
	line-height: 1.3;
	color: #9ca3af;
}

.tp-card__footer span {
	width: 100%;
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.tp-page--zh .tp-card__footer {
	padding-top: 2px;
}

.ma-btn--action.tp-interest {
	background: linear-gradient(135deg, var(--ma-accent) 0%, var(--ma-accent-deep) 100%);
	color: #ffffff;
	border: none;
}

.tp-interest.is-selected {
	background: #ffffff;
	color: var(--ma-accent);
	border: 1px solid var(--ma-accent);
}

.tp-interest[data-training-id="0"] {
	background: #f1f5f9;
	color: #64748b;
	border-color: #e2e8f0;
	cursor: default;
}

/* ---- Attendance action buttons (训练出席操作按钮) ---- */
.ma-card__actions {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-top: 16px;
}

.ma-card__actions.is-hidden {
	display: none;
}

.tp-card[data-attended="false"] .ma-card__actions {
	grid-template-columns: 1fr;
}

.ma-btn {
	width: 100%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.4;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	text-decoration: none;
	cursor: pointer;
}

.ma-btn--status {
	background: #f1f5f9;
	color: #64748b;
	border-color: #e2e8f0;
	font-weight: 600;
}

.ma-btn--status:disabled {
	opacity: 1;
	cursor: default;
}

.ma-btn--action {
	border-color: var(--ma-accent);
	background: #ffffff;
	color: var(--ma-accent);
}

.ma-btn--action.ma-attend-btn:active {
	transform: scale(0.98);
}

.tp-card[data-attended="true"] .ma-btn--action {
	background: linear-gradient(135deg, var(--ma-accent) 0%, var(--ma-accent-deep) 100%);
	color: #ffffff;
	border: none;
}

.tp-page--zh .ma-btn--action,
.tp-page--zh .ma-btn--status {
	font-size: 13px;
	padding: 10px 14px;
	border-radius: 14px;
}

.tp-bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	bottom: env(safe-area-inset-bottom, 0px);
	width: 100%;
	max-width: none;
	margin: 0 auto;
	transform: none;
	height: var(--tp-nav-height);
	height: calc(var(--tp-nav-height) + env(safe-area-inset-bottom));
	min-height: var(--tp-nav-height);
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	align-items: center;
	padding: 0 6px 0;
	padding-bottom: constant(safe-area-inset-bottom);
	padding-bottom: env(safe-area-inset-bottom);
	background: #ffffff;
	border-top: 1px solid #e5e7eb;
	z-index: 999;
}

.tp-page--zh .tp-bottom-nav {
	padding-left: 4px;
	padding-right: 4px;
}

.tp-bottom-nav a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	color: #9ca3af;
	text-decoration: none;
	font-size: 13px;
}

.tp-bottom-nav a span {
	display:flex;
	align-items:center;
	justify-content:center;
}

.tp-bottom-nav a img { width:20px; height:20px; }

.tp-bottom-nav a.is-active {
	color: var(--tp-accent);
	font-weight: 700;
}

.tp-bottom-nav__plus span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--tp-accent);
	color: #ffffff;
	font-size: 24px;
	box-shadow: 0 8px 18px rgba(249,115,22,.24);
}

.tp-page--zh .tp-bottom-nav__plus span {
	width: 46px;
	height: 46px;
	box-shadow: 0 4px 14px rgba(249,115,22,.45);
}

.tp-bottom-nav__plus img { width:22px; height:22px; }

/* Default fallback styling */
.home-training-programmes .programme-item{display:flex;align-items:center;gap:12px;padding:12px;border-radius:10px;background:#fff;border:1px solid #e5e7eb;margin-top:12px}
.thumb{width:56px;height:56px;border-radius:8px;background:#fde68a;display:flex;align-items:center;justify-content:center;font-weight:800;color:#92400e}
.btn-outline{border:1px solid #f97316;background:transparent;color:#f97316;padding:8px 12px;border-radius:8px}

@media (min-width: 768px) {
	body.home-training-programmes {
		background: var(--tp-bg);
	}

	.tp-page {
		box-shadow: none;
	}

	.tp-bottom-nav {
		left: 0;
		right: 0;
		width: 100%;
		max-width: none;
		transform: none;
	}
}

/* ---- Card Logo (卡片Logo) ---- */
.tp-card__logo {
	width: 44px;
	height: 44px;
	border-radius: 11px;
	overflow: hidden;
	flex: 0 0 44px;
	background: #f9fafb;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tp-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 4px;
}

.tp-page--zh .tp-card__logo {
	width: 42px;
	height: 42px;
	flex-basis: 42px;
	border-radius: 10px;
}

/* ---- Card Link (可点击卡片) ---- */
.tp-card--link {
	display: block;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

/* ---- Org List Page (机构列表页) ---- */
.ol-back {
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ol-back img {
	width: 20px;
	height: 20px;
}

.ol-website {
	color: #059669;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.ol-website:hover {
	text-decoration: underline;
}

.tp-page--zh .ol-website {
	font-size: 12px;
}
