/* ==============================================================================
   EHSCentre MY — Training marketplace
   Public pages (#training-screen), dashboard modules (.tm-app), modal and toast.
   Everything is prefixed tm- so nothing here touches the rest of the site.
   ============================================================================== */

:root {
  --tm-green: #001f1f;
  --tm-green-deep: #003d3d;
  --tm-green-soft: #eff5ce;
  --tm-ink: #001f1f;
  --tm-ink-2: #5c7070;
  --tm-ink-3: #6a7878;
  --tm-line: rgba(0, 31, 31, 0.10);
  --tm-surface: #ffffff;
  --tm-surface-2: #f7f6f2;
  --tm-canvas: #f7f6f2;
  --tm-warn: #9a5b00;
  --tm-warn-bg: #fdf3df;
  --tm-bad: #b3261e;
  --tm-bad-bg: #fdecea;
  --tm-shadow: 0 1px 2px rgba(0, 31, 31, 0.04), 0 8px 24px rgba(0, 31, 31, 0.06);
  --tm-radius: 16px;
}
html[data-theme="dark"] body.in-app {
  --tm-green: #4fbf9f;
  --tm-green-deep: #7fd6bc;
  --tm-green-soft: rgba(79, 191, 159, 0.14);
  --tm-ink: #f7f6f2;
  --tm-ink-2: #b9c4be;
  --tm-ink-3: #8d9993;
  --tm-line: rgba(255, 255, 255, 0.12);
  --tm-surface: #17201d;
  --tm-surface-2: #1e2925;
  --tm-canvas: #101714;
  --tm-warn: #f2c26b;
  --tm-warn-bg: rgba(242, 194, 107, 0.14);
  --tm-bad: #ff9a92;
  --tm-bad-bg: rgba(255, 154, 146, 0.14);
  --tm-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Public screen ---------- */
html:has(#training-screen:not(.hidden)),
body:has(#training-screen:not(.hidden)) { background-color: #f7f6f2 !important; }

.training-screen {
  min-height: 100vh;
  background: var(--tm-canvas);
  color: var(--tm-ink);
  font-family: 'Matter', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  position: relative;
  display: flex;
  flex-direction: column;
}
.training-screen.hidden { display: none; }
.training-screen::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 620px;
  pointer-events: none;
  background:
    radial-gradient(60% 70% at 8% 0%, rgba(247, 246, 242, 0) 0%, rgba(247, 246, 242, 0) 70%),
    radial-gradient(45% 55% at 100% 8%, rgba(247, 246, 242, 0) 0%, rgba(247, 246, 242, 0) 70%);
}
.training-screen > * { position: relative; }
.training-screen a { color: var(--tm-green-deep); }

.tm-nav { position: sticky; top: 0; z-index: 40; background: rgba(247, 246, 242, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--tm-line); }
.tm-nav-in { max-width: 1160px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.tm-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tm-ink) !important; font-weight: 700; font-size: 16px; line-height: 1.1; }
.tm-logo b { color: var(--tm-green); }
.tm-logo small { display: block; font-size: 11px; font-weight: 600; color: var(--tm-ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.tm-nav nav { display: flex; gap: 4px; margin-left: auto; }
.tm-nav nav a { padding: 8px 12px; border-radius: 29px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--tm-ink-2); }
.tm-nav nav a:hover { background: var(--tm-green-soft); color: var(--tm-ink); }
.tm-nav nav a.is-active { color: var(--tm-green-deep); background: var(--tm-green-soft); font-weight: 600; }

.tm-main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 8px 20px 72px; box-sizing: border-box; }
.tm-foot { border-top: 1px solid var(--tm-line); background: var(--tm-surface-2); }
.tm-foot-in { max-width: 1160px; margin: 0 auto; padding: 24px 20px 32px; font-size: 12.5px; line-height: 1.6; color: var(--tm-ink-2); }
.tm-foot-in p { margin: 0 0 8px; max-width: 900px; }

.tm-hero { padding: 56px 0 32px; max-width: 820px; }
.tm-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tm-green-deep); background: var(--tm-green-soft); padding: 5px 12px; border-radius: 29px; }
.tm-hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; margin: 16px 0 14px; text-wrap: balance; }
.tm-hero h1 span { color: var(--tm-green); }
.tm-hero p { font-size: 17px; line-height: 1.55; color: var(--tm-ink-2); margin: 0; max-width: 680px; }
.tm-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.tm-h1 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.12; letter-spacing: -0.025em; font-weight: 600; margin: 12px 0 8px; text-wrap: balance; }
.tm-h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 32px 0 12px; }
.tm-h4 { font-size: 14px; font-weight: 700; margin: 18px 0 6px; }
.tm-lead { font-size: 16px; line-height: 1.6; color: var(--tm-ink-2); margin: 10px 0 0; }
.tm-prose { font-size: 15px; line-height: 1.7; color: var(--tm-ink); overflow-wrap: anywhere; }
.tm-muted { color: var(--tm-ink-3); }
.tm-small { font-size: 12.5px; line-height: 1.5; }
.tm-crumb { font-size: 13px; color: var(--tm-ink-3); padding: 24px 0 4px; }
.tm-crumb a { text-decoration: none; }

/* ---------- Buttons ---------- */
.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; box-sizing: border-box;
  border: 1px solid var(--tm-line); border-radius: 29px; background: var(--tm-surface); color: var(--tm-ink) !important;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s;
}
.tm-btn:hover { border-color: var(--tm-green); background: var(--tm-green-soft); }
.tm-btn:active { transform: translateY(1px); }
.tm-btn:focus-visible, .tm-tab:focus-visible, .tm-link:focus-visible, .tm-x:focus-visible, .tm-suggest-item:focus-visible { outline: 2px solid var(--tm-green); outline-offset: 2px; }
.tm-btn[disabled] { opacity: .55; cursor: not-allowed; }
.tm-btn-primary { background: var(--tm-green); border-color: var(--tm-green); color: #ffffff !important; }
.tm-btn-primary:hover { background: var(--tm-green-deep); border-color: var(--tm-green-deep); }
html[data-theme="dark"] body.in-app .tm-btn-primary { color: #0d1512 !important; }
.tm-btn-danger { color: var(--tm-bad) !important; }
.tm-btn-danger:hover { border-color: var(--tm-bad); background: var(--tm-bad-bg); }
.tm-btn-sm { min-height: 32px; padding: 5px 12px; font-size: 12.5px; }
.tm-btn-lg { min-height: 48px; padding: 12px 24px; font-size: 15px; }
.tm-btn-block { width: 100%; margin-top: 12px; }
.tm-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--tm-green-deep); cursor: pointer; text-decoration: underline; }

/* ---------- Filters ---------- */
.tm-filters { display: grid; grid-template-columns: 2fr 1.3fr 1fr 1fr; gap: 12px; padding: 16px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); box-shadow: var(--tm-shadow); }
.tm-filters label, .tm-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--tm-ink-2); min-width: 0; }
.tm-form label small, .tm-form legend small { font-weight: 500; color: var(--tm-ink-3); }
.tm-filters input, .tm-filters select, .tm-form input:not([type=checkbox]), .tm-form select, .tm-form textarea, .tm-staff-q, #tm-confirm-reason {
  width: 100%; box-sizing: border-box; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--tm-line); border-radius: 10px; background: var(--tm-surface); color: var(--tm-ink);
  font: inherit; font-size: 14.5px; font-weight: 400;
}
.tm-form textarea, #tm-confirm-reason { resize: vertical; line-height: 1.5; }
.tm-filters input:focus, .tm-filters select:focus, .tm-form input:focus, .tm-form select:focus, .tm-form textarea:focus, .tm-staff-q:focus { outline: 2px solid var(--tm-green); outline-offset: 1px; border-color: var(--tm-green); }
.tm-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 32px 0 14px; }
.tm-results-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }

/* ---------- Course cards ---------- */
.tm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.tm-cards-1 { grid-template-columns: minmax(0, 1fr); }
.tm-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); box-shadow: var(--tm-shadow); min-width: 0; }
.tm-card-top { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 29px; background: var(--tm-green-soft); color: var(--tm-green-deep); }
.tm-chip.is-soft { background: var(--tm-surface-2); color: var(--tm-ink-2); }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-card-title { font-size: 18px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; margin: 4px 0 0; overflow-wrap: anywhere; }
.tm-card-title a { color: var(--tm-ink) !important; text-decoration: none; }
.tm-card-title a:hover { color: var(--tm-green-deep) !important; text-decoration: underline; }
.tm-card-by { font-size: 13px; color: var(--tm-ink-2); }
.tm-card-by a { font-weight: 600; text-decoration: none; }
.tm-check { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--tm-green-deep); background: var(--tm-green-soft); padding: 2px 8px; border-radius: 29px; margin-left: 4px; white-space: nowrap; }
.tm-card-sum { font-size: 14px; line-height: 1.55; color: var(--tm-ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tm-card-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--tm-ink-2); flex-wrap: wrap; }
.tm-price strong { font-size: 17px; color: var(--tm-ink); font-variant-numeric: tabular-nums; }
.tm-dates { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--tm-line); }
.tm-dates li { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--tm-line); font-size: 13.5px; }
.tm-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.tm-where { color: var(--tm-ink-2); flex: 1 1 140px; min-width: 0; }
.tm-seats { font-size: 12px; font-weight: 600; color: var(--tm-ink-3); white-space: nowrap; }
.tm-seats.is-low { color: var(--tm-warn); }
.tm-seats.is-full { color: var(--tm-bad); }
.tm-row-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.tm-more, .tm-nodate { font-size: 12.5px; color: var(--tm-ink-3); }
.tm-nodate { padding: 10px 0; border-top: 1px solid var(--tm-line); }
.tm-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.tm-dates-lg li { flex-direction: column; align-items: flex-start; gap: 4px; }
.tm-dates-lg .tm-where { flex: none; }
.tm-dates-lg .tm-btn { margin-top: 6px; }

/* ---------- Providers ---------- */
.tm-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tm-prov { display: flex; gap: 14px; align-items: center; min-width: 0; padding: 16px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); text-decoration: none; color: var(--tm-ink) !important; }
.tm-prov:hover { border-color: var(--tm-green); }
.tm-prov-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tm-green); color: #fff; font-weight: 700; font-size: 18px; }
.tm-prov-badge.is-lg { width: 64px; height: 64px; font-size: 26px; border-radius: 16px; }
.tm-prov-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-prov-txt strong { font-size: 15px; }
.tm-prov-txt small { font-size: 12.5px; color: var(--tm-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-prov-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 12px 0 8px; }
.tm-prov-head > div { flex: 1 1 320px; min-width: 0; }
.tm-prov-head .tm-h1 { margin-top: 0; }
.tm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 20px 0; }
.tm-stats > div { padding: 16px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: 14px; }
.tm-stats strong { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tm-stats span { font-size: 12.5px; color: var(--tm-ink-2); }

.tm-two { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.tm-col-side { position: sticky; top: 84px; }
.tm-box { padding: 20px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); box-shadow: var(--tm-shadow); }
.tm-box h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tm-ink-3); margin: 18px 0 8px; }
.tm-box h3:first-child { margin-top: 0; }
.tm-box p { font-size: 14px; line-height: 1.55; margin: 0 0 4px; overflow-wrap: anywhere; }
.tm-box-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.tm-box-price strong { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.tm-box-price span { font-size: 13px; color: var(--tm-ink-2); }
.tm-acc { list-style: none; margin: 0; padding: 0; }
.tm-acc li { padding: 8px 0; border-bottom: 1px solid var(--tm-line); font-size: 14px; }
.tm-acc li span { display: block; font-size: 12.5px; color: var(--tm-ink-2); }
.tm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; margin: 8px 0 0; }
.tm-facts > div { padding: 10px 0; border-bottom: 1px solid var(--tm-line); }
.tm-facts dt { font-size: 12px; font-weight: 600; color: var(--tm-ink-3); }
.tm-facts dd { margin: 2px 0 0; font-size: 14.5px; }

.tm-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0 8px; }
.tm-why > div { padding: 20px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); }
.tm-why h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.tm-why p { font-size: 14px; line-height: 1.6; color: var(--tm-ink-2); margin: 0; }
.tm-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.tm-steps li { display: flex; gap: 16px; align-items: flex-start; }
.tm-steps li > span { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tm-green-soft); color: var(--tm-green-deep); font-weight: 700; }
.tm-steps li strong { font-size: 15.5px; }
.tm-steps li p { margin: 2px 0 0; font-size: 14px; line-height: 1.55; color: var(--tm-ink-2); }

/* ---------- States ---------- */
.tm-loading { display: flex; align-items: center; gap: 12px; padding: 48px 0; color: var(--tm-ink-2); font-size: 14.5px; }
.tm-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tm-line); border-top-color: var(--tm-green); animation: tm-spin .8s linear infinite; }
@keyframes tm-spin { to { transform: rotate(360deg); } }
.tm-empty { padding: 40px 24px; text-align: center; background: var(--tm-surface); border: 1px dashed var(--tm-line); border-radius: var(--tm-radius); }
.tm-empty h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.tm-empty p { font-size: 14.5px; line-height: 1.55; color: var(--tm-ink-2); margin: 0 auto 16px; max-width: 520px; }
.tm-empty-launch { border-style: solid; padding: 56px 24px; }
.tm-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Dashboard modules ---------- */
.tm-app { color: var(--tm-ink); max-width: 1180px; }
.tm-app a { color: var(--tm-green-deep); }
.tm-app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.tm-app-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.tm-app-head p { font-size: 13.5px; color: var(--tm-ink-2); margin: 0; max-width: 720px; line-height: 1.5; }
.tm-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--tm-line); margin: 0 0 18px; }
.tm-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; margin-bottom: -1px; font: inherit; font-size: 14px; font-weight: 600; color: var(--tm-ink-2); cursor: pointer; }
.tm-tab:hover { color: var(--tm-ink); }
.tm-tab.is-on { color: var(--tm-green-deep); border-bottom-color: var(--tm-green); }
.tm-tab-n { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 29px; background: var(--tm-green); color: #fff; font-size: 11px; text-align: center; }
html[data-theme="dark"] body.in-app .tm-tab-n { color: #0d1512; }
.tm-suggest { padding: 16px; margin-bottom: 14px; background: var(--tm-green-soft); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); }
.tm-suggest-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.tm-suggest-h strong { font-size: 14.5px; }
.tm-suggest-h span { font-size: 12.5px; color: var(--tm-ink-2); }
.tm-suggest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tm-suggest-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: 12px; font: inherit; color: var(--tm-ink); cursor: pointer; }
.tm-suggest-item:hover, .tm-suggest-item.is-on { border-color: var(--tm-green); }
.tm-suggest-item.is-on { box-shadow: inset 0 0 0 1px var(--tm-green); }
.tm-suggest-item strong { font-size: 14px; }
.tm-suggest-item span { font-size: 12.5px; color: var(--tm-ink-2); }
.tm-active-filter { font-size: 13px; color: var(--tm-ink-2); margin: 10px 2px; }
.tm-app .tm-filters { margin-bottom: 16px; }
.tm-panel { padding: 20px; margin-bottom: 14px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); }
.tm-panel h3, .tm-panel-head h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.tm-panel p { font-size: 14px; line-height: 1.6; color: var(--tm-ink-2); margin: 0 0 8px; }
.tm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.tm-panel-head h3 { margin: 0; }
.tm-list { display: grid; gap: 10px; }
.tm-item { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 16px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: 14px; }
.tm-item-main { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.tm-item-title { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tm-item-sub { font-size: 13px; color: var(--tm-ink-2); overflow-wrap: anywhere; }
.tm-item-body { font-size: 14px; line-height: 1.55; padding: 8px 12px; background: var(--tm-surface-2); border-radius: 10px; overflow-wrap: anywhere; }
.tm-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tm-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 29px; vertical-align: middle; white-space: nowrap; }
.tm-pill-ok { background: var(--tm-green-soft); color: var(--tm-green-deep); }
.tm-pill-warn { background: var(--tm-warn-bg); color: var(--tm-warn); }
.tm-pill-bad { background: var(--tm-bad-bg); color: var(--tm-bad); }
.tm-pill-mute { background: var(--tm-surface-2); color: var(--tm-ink-2); }
.tm-banner { padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; border: 1px solid var(--tm-line); overflow-wrap: anywhere; }
.tm-banner-ok { background: var(--tm-green-soft); }
.tm-banner-warn { background: var(--tm-warn-bg); }
.tm-banner-bad { background: var(--tm-bad-bg); }
.tm-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.tm-todo li { display: flex; align-items: center; gap: 10px; }
.tm-todo li > span { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--tm-line); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.tm-todo li.is-done { color: var(--tm-ink-2); }
.tm-todo li.is-done > span { background: var(--tm-green); border-color: var(--tm-green); color: #fff; }

/* ---------- Forms ---------- */
.tm-form { display: grid; gap: 14px; }
.tm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tm-field { border: 1px solid var(--tm-line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; min-width: 0; display: grid; gap: 10px; }
.tm-field legend { font-size: 12.5px; font-weight: 700; color: var(--tm-ink-2); padding: 0 6px; }
.tm-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.tm-checks label, .tm-checkline { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-size: 13.5px !important; font-weight: 500 !important; color: var(--tm-ink) !important; cursor: pointer; }
.tm-checks input, .tm-checkline input, .tm-staff-row input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--tm-green); }
.tm-acc-row { gap: 8px; }
.tm-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.tm-form-note { font-size: 13px; line-height: 1.5; color: var(--tm-ink-2); padding: 10px 12px; background: var(--tm-surface-2); border-radius: 10px; }
.tm-form-error { display: none; font-size: 13.5px; font-weight: 600; color: var(--tm-bad); background: var(--tm-bad-bg); padding: 10px 12px; border-radius: 10px; }
.tm-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.tm-form-foot .tm-muted { font-size: 12.5px; flex: 1 1 240px; line-height: 1.45; }
.tm-summary { display: grid; gap: 2px; padding: 12px 14px; background: var(--tm-green-soft); border-radius: 12px; font-size: 13.5px; color: var(--tm-ink-2); }
.tm-summary strong { font-size: 15.5px; color: var(--tm-ink); }
.tm-staff { max-height: 220px; overflow: auto; border: 1px solid var(--tm-line); border-radius: 10px; }
.tm-staff-row { flex-direction: row !important; align-items: center; gap: 10px !important; padding: 9px 12px; border-bottom: 1px solid var(--tm-line); cursor: pointer; }
.tm-staff-row:last-child { border-bottom: 0; }
.tm-staff-row span { display: flex; flex-direction: column; min-width: 0; }
.tm-staff-row strong { font-size: 14px; color: var(--tm-ink); font-weight: 600; }
.tm-staff-row small { font-size: 12px; color: var(--tm-ink-3); font-weight: 500; }
.tm-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--tm-line); border-radius: 12px; font-size: 14px; }
.tm-total strong { font-size: 17px; font-variant-numeric: tabular-nums; }

/* ---------- Modal + toast (attached to <body>) ---------- */
.tm-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; background: rgba(15, 25, 21, 0.5); font-family: 'Matter', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--tm-ink); letter-spacing: -0.011em; }
.tm-modal-card { width: 100%; max-width: 520px; background: var(--tm-surface); border-radius: 18px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3); animation: tm-pop .18s ease-out; }
.tm-modal-card.is-wide { max-width: 720px; }
@keyframes tm-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.tm-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.tm-modal-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; margin: 0; overflow-wrap: anywhere; }
.tm-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--tm-surface-2); color: var(--tm-ink); font-size: 20px; line-height: 1; cursor: pointer; }
.tm-modal-body { padding: 16px 22px 22px; font-size: 14.5px; line-height: 1.55; }
.tm-modal-body > p { margin: 0 0 12px; color: var(--tm-ink-2); }
.tm-modal a { color: var(--tm-green-deep); }
.tm-done { text-align: center; padding: 16px 0 4px; }
.tm-done-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--tm-green-soft); color: var(--tm-green-deep); font-size: 26px; font-weight: 700; }
.tm-done h4 { font-size: 18px; margin: 0 0 6px; }
.tm-done p { color: var(--tm-ink-2); margin: 0 auto 16px; max-width: 420px; }
.tm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 100001; transform: translate(-50%, 16px); max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 12px; background: #17201d; color: #fff; font-family: 'Matter', 'Inter', sans-serif; font-size: 14px; font-weight: 500; line-height: 1.45; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.tm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tm-toast-err { background: #8f1d17; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .tm-two { grid-template-columns: 1fr; gap: 20px; }
  .tm-col-side { position: static; }
  .tm-filters { grid-template-columns: 1fr 1fr; }
  .tm-f-q { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .tm-nav-in { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .tm-nav nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .tm-nav nav a { white-space: nowrap; padding: 8px 10px; font-size: 13.5px; }
  .tm-nav-cta { margin-left: auto; }
  .tm-main { padding: 4px 16px 56px; }
  .tm-foot-in { padding: 20px 16px 28px; }
  .tm-hero { padding: 36px 0 24px; }
  .tm-hero p { font-size: 15.5px; }
  .tm-cards, .tm-providers { grid-template-columns: minmax(0, 1fr); }
  .tm-grid2, .tm-filters { grid-template-columns: 1fr; }
  .tm-row-actions { margin-left: 0; width: 100%; }
  .tm-row-actions .tm-btn { flex: 1; }
  .tm-modal { padding: 0; align-items: flex-end; }
  .tm-modal-card, .tm-modal-card.is-wide { max-width: none; border-radius: 18px 18px 0 0; max-height: 94vh; overflow-y: auto; }
  .tm-item-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-spin, .tm-modal-card { animation: none; }
  .tm-btn, .tm-toast { transition: none; }
}

/* ==============================================================================
   Standalone training page (training.html): base, home paths, provider sign-up,
   provider dashboard. The company dashboard does not use anything below.
   ============================================================================== */
body.tm-page { margin: 0; background: #f7f6f2; color: var(--tm-ink); -webkit-text-size-adjust: 100%; }
body.tm-page *, body.tm-page *::before, body.tm-page *::after { box-sizing: border-box; }
body.tm-page button, body.tm-page input, body.tm-page select, body.tm-page textarea { font-family: inherit; }
.tm-nav-actions { display: flex; gap: 8px; align-items: center; }
.tm-nav-actions .tm-btn { min-height: 38px; padding: 7px 14px; font-size: 13.5px; }

.tm-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; max-width: 820px; }
.tm-path { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--tm-radius); border: 1px solid var(--tm-line); background: var(--tm-surface); box-shadow: var(--tm-shadow); text-decoration: none; color: var(--tm-ink) !important; transition: border-color .15s, transform .15s; }
.tm-path:hover { border-color: var(--tm-green); transform: translateY(-2px); }
.tm-path.is-provider { background: var(--tm-green); border-color: var(--tm-green); color: #fff !important; }
.tm-path.is-provider:hover { background: var(--tm-green-deep); }
.tm-path-k { font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; opacity: .75; }
.tm-path strong { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.tm-path span:not(.tm-path-k) { font-size: 14px; line-height: 1.5; opacity: .85; }
.tm-path em { font-style: normal; font-weight: 700; font-size: 14px; margin-top: 6px; }
.tm-how { margin-top: 48px; }
.tm-how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tm-how li { display: flex; gap: 14px; padding: 18px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); }
.tm-how li > span { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--tm-green-soft); color: var(--tm-green-deep); font-weight: 700; }
.tm-how strong { font-size: 15.5px; }
.tm-how p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--tm-ink-2); }

/* ---------- Provider register / sign in ---------- */
.tp-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 48px; align-items: start; padding: 48px 0 24px; }
.tp-auth-narrow { grid-template-columns: minmax(0, 460px); justify-content: center; }
.tp-auth-pitch h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; margin: 16px 0 20px; text-wrap: balance; }
.tp-auth-pitch ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tp-auth-pitch li { position: relative; padding-left: 30px; font-size: 15.5px; line-height: 1.55; color: var(--tm-ink-2); }
.tp-auth-pitch li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--tm-green-soft); color: var(--tm-green-deep); font-size: 12px; font-weight: 700; }
.tp-auth-pitch li strong { color: var(--tm-ink); }
.tp-card { padding: 28px; background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: 20px; box-shadow: var(--tm-shadow); }
.tp-card-h { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.tp-card p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.tp-card-links { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; justify-content: center; font-size: 13.5px; }
.tp-card-links a { font-weight: 600; }
.tp-code { font-size: 26px !important; font-weight: 600 !important; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; min-height: 60px !important; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chips label { position: relative; flex-direction: row !important; cursor: pointer; }
.tp-chips input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.tp-chips span { display: inline-block; padding: 7px 13px; border-radius: 29px; border: 1px solid var(--tm-line); background: var(--tm-surface); font-size: 13.5px; font-weight: 500; color: var(--tm-ink); transition: background-color .12s, border-color .12s; }
.tp-chips input:checked + span { background: var(--tm-green); border-color: var(--tm-green); color: #fff; }
.tp-chips input:focus-visible + span { outline: 2px solid var(--tm-green); outline-offset: 2px; }

/* ---------- Provider dashboard ---------- */
html.tp-in-portal, html.tp-in-portal body { background: var(--tm-surface-2) !important; }
html.tp-in-portal .training-screen::before { display: none; }
.tp-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; max-width: none; background: var(--tm-surface-2); }
.tp-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; background: var(--tm-surface); border-right: 1px solid var(--tm-line); overflow-y: auto; }
.tp-side .tm-logo { padding: 0 6px; }
.tp-who { display: grid; gap: 6px; justify-items: start; padding: 12px; background: var(--tm-surface-2); border-radius: 12px; }
.tp-who strong { font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.tp-nav { display: grid; gap: 2px; }
.tp-nav-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--tm-ink-2); text-align: left; cursor: pointer; }
.tp-nav-btn > span { width: 18px; text-align: center; opacity: .7; }
.tp-nav-btn:hover { background: var(--tm-surface-2); color: var(--tm-ink); }
.tp-nav-btn.is-on { background: var(--tm-green-soft); color: var(--tm-green-deep); }
.tp-nav-btn:focus-visible { outline: 2px solid var(--tm-green); outline-offset: 1px; }
.tp-nav-btn b { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 29px; background: var(--tm-green); color: #fff; font-size: 11.5px; text-align: center; }
.tp-side-foot { margin-top: auto; display: grid; gap: 10px; justify-items: start; padding: 12px 6px 0; border-top: 1px solid var(--tm-line); font-size: 13.5px; }
.tp-side-foot a { font-weight: 600; text-decoration: none; }
.tp-side-foot small { color: var(--tm-ink-3); overflow-wrap: anywhere; }
.tp-main { min-width: 0; }
.tp-main-in { max-width: 980px; margin: 0 auto; padding: 28px 28px 72px; }
.tp-wait { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 100vh; color: var(--tm-ink-2); font-size: 15px; padding: 24px; }

@media (max-width: 900px) {
  .tp-auth { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; }
  .tm-how ol { grid-template-columns: minmax(0, 1fr); }
  .tp-shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .tp-side { position: static; height: auto; gap: 10px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--tm-line); }
  .tp-who { grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .tp-nav { display: flex; gap: 4px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; }
  .tp-nav-btn { width: auto; white-space: nowrap; padding: 9px 12px; }
  .tp-side-foot { margin-top: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding-top: 10px; }
  .tp-main-in { padding: 18px 16px 56px; }
}
@media (max-width: 640px) {
  .tm-paths { grid-template-columns: minmax(0, 1fr); }
  .tm-nav-actions { margin-left: auto; }
  .tm-nav-actions .tm-btn { padding: 6px 11px; font-size: 12.5px; }
  .tp-card { padding: 20px; border-radius: 16px; }
}

/* ==============================================================================
   Provider pages: cover photo, logo, posts, reviews, photos (ts- prefix)
   ============================================================================== */
.ts-stars { color: rgba(120, 130, 125, 0.4); letter-spacing: 1px; font-size: 15px; white-space: nowrap; }
.ts-stars > span { color: #d9920a; }
.ts-rating { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; font-size: 13.5px; color: var(--tm-ink-2); }
.ts-rating strong { color: var(--tm-ink); font-variant-numeric: tabular-nums; }
.ts-jump { text-decoration: none; }
.ts-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ts-hero { background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); overflow: hidden; }
.ts-cover { aspect-ratio: 16 / 5; min-height: 140px; max-height: 320px; width: 100%; background-color: var(--tm-green-soft); background-size: cover; background-position: center; }
.ts-cover.is-empty { aspect-ratio: auto; min-height: 96px; height: 96px; background-image: linear-gradient(135deg, var(--tm-green-soft), var(--tm-surface-2)); }
.ts-hero-row { display: flex; gap: 18px; align-items: flex-start; padding: 0 22px 22px; flex-wrap: wrap; }
.ts-logo { flex: none; width: 96px; height: 96px; margin-top: -40px; border-radius: 20px; border: 4px solid var(--tm-surface); background: var(--tm-surface); object-fit: cover; box-shadow: var(--tm-shadow); }
.ts-logo-letter { display: grid; place-items: center; background: var(--tm-green); color: #fff; font-size: 40px; font-weight: 700; }
.ts-hero-text { flex: 1; min-width: 220px; padding-top: 14px; }
.ts-hero-text .tm-h1 { margin: 0 0 4px; }
.ts-hero-text .tm-lead { margin: 0 0 8px; }
.ts-hero-row > .tm-btn { margin-top: 18px; }
.ts-active { margin-top: 8px; font-size: 13.5px; color: var(--tm-green-deep); font-weight: 600; }

.ts-post, .ts-review { padding: 18px 0; border-top: 1px solid var(--tm-line); }
#ts-posts > .ts-post:first-child, #ts-course-reviews > .ts-review:first-child { border-top: 0; padding-top: 4px; }
.ts-post p, .ts-review p { margin: 6px 0 0; max-width: 72ch; overflow-wrap: anywhere; }
.ts-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--tm-ink-2); }
.ts-meta a { color: var(--tm-green-deep); }
.ts-review-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.ts-verified { display: inline-block; padding: 1px 8px; border-radius: 29px; background: var(--tm-green-soft); color: var(--tm-green-deep); font-weight: 600; font-size: 12.5px; }
.ts-reply { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--tm-green); background: var(--tm-surface-2); border-radius: 0 10px 10px 0; font-size: 14px; }
.ts-reply p { margin-top: 2px; }
.ts-more { margin-top: 14px; }

.ts-gallery { display: grid; gap: 6px; margin-top: 12px; max-width: 560px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ts-gallery.ts-n1 { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
.ts-gallery.ts-n3 .ts-ph:first-child { grid-column: 1 / -1; }
.ts-ph { padding: 0; border: 0; background: var(--tm-surface-2); border-radius: 10px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; display: block; }
.ts-gallery.ts-n3 .ts-ph:first-child { aspect-ratio: 16 / 9; }
.ts-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-zoom { position: fixed; inset: 0; z-index: 1300; background: rgba(8, 14, 12, 0.9); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.ts-zoom img { max-width: 100%; max-height: 92vh; border-radius: 8px; }
.ts-zoom button { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 24px; cursor: pointer; }

.ts-sum { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 4px 0 16px; }
.ts-sum-big { display: grid; gap: 2px; min-width: 110px; }
.ts-sum-big strong { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ts-sum-big > span:last-child { font-size: 13px; color: var(--tm-ink-2); }
.ts-sum-bars { flex: 1; min-width: 220px; max-width: 360px; display: grid; gap: 4px; font-size: 13px; color: var(--tm-ink-2); }
.ts-sum-bars > div { display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 8px; align-items: center; }
.ts-sum-bars i { display: block; height: 8px; border-radius: 99px; background: var(--tm-surface-2); overflow: hidden; }
.ts-sum-bars b { display: block; height: 100%; background: #d9920a; border-radius: 99px; }
.ts-sum-bars em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }

.ts-need { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--tm-warn-bg); color: var(--tm-ink); font-size: 14.5px; }
.ts-need a { color: var(--tm-green-deep); font-weight: 600; }

/* photo picker */
.ts-photos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ts-photos small { flex-basis: 100%; }
.ts-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-thumbs:empty { display: none; }
.ts-thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--tm-surface-2); }
.ts-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-thumb button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(10, 16, 14, 0.75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.ts-add { cursor: pointer; }
.ts-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ts-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tm-form label.tm-check-row, .tm-check-row { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 400; }
.tm-form label.tm-check-row input, .tm-check-row input { margin-top: 3px; flex: none; width: auto; }

/* star picker: stars up to the chosen one are lit */
.ts-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; border: 0; padding: 0; margin: 0 0 12px; position: relative; padding-top: 24px; }
.ts-pick legend { position: absolute; top: 0; left: 0; font-size: 13px; font-weight: 600; padding: 0; }
.ts-pick label { cursor: pointer; font-size: 34px; line-height: 1; color: rgba(120, 130, 125, 0.4); margin: 0; }
.tm-form .ts-pick input, .ts-pick input { position: absolute; opacity: 0; width: 1px; min-width: 0; height: 1px; padding: 0; margin: 0; border: 0; pointer-events: none; }
.tm-form .ts-pick label, .ts-pick label { display: inline-block; width: auto; transition: none; }
.ts-pick label:hover, .ts-pick label:hover ~ label, .ts-pick label:has(input:checked), .ts-pick label:has(input:checked) ~ label { color: #d9920a; }
.ts-pick label:has(input:focus-visible) { outline: 2px solid var(--tm-green); outline-offset: 2px; border-radius: 6px; }

/* request and review recap, my requests */
.ts-recap { display: grid; gap: 2px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--tm-surface-2); font-size: 14px; }
.ts-recap strong { font-size: 15.5px; }
.ts-recap span { color: var(--tm-ink-2); }
.ts-page { max-width: 820px; }
.ts-booking { background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); padding: 18px 20px; margin-top: 14px; }
.ts-booking-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ts-booking h3 { margin: 0; font-size: 17px; }
.ts-booking h3 a { color: inherit; text-decoration: none; }
.ts-booking h3 a:hover { text-decoration: underline; }
.ts-booking-top p { margin: 2px 0 0; color: var(--tm-ink-2); font-size: 14px; }
.ts-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 14px 0 0; }
.ts-facts dt { font-size: 12.5px; color: var(--tm-ink-2); }
.ts-facts dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.ts-myreview { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tm-line); }
.ts-myreview p { margin: 4px 0 0; }

/* provider dashboard */
.ts-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ts-slot { display: flex; gap: 14px; align-items: center; min-width: 0; }
.ts-slot-view { flex: none; display: grid; place-items: center; background: var(--tm-surface-2) center / cover no-repeat; border: 1px dashed var(--tm-line); color: var(--tm-ink-3); font-size: 12px; text-align: center; overflow: hidden; }
.ts-slot-cover .ts-slot-view { width: 168px; height: 72px; border-radius: 10px; }
.ts-slot-logo .ts-slot-view { width: 72px; height: 72px; border-radius: 16px; }
.ts-slot-view img { width: 100%; height: 100%; object-fit: cover; }
.ts-slot-text { min-width: 0; display: grid; gap: 2px; }
.ts-slot-text small { font-size: 12.5px; }
.ts-slot .ts-row { margin-top: 8px; }
.ts-own .ts-post, .ts-own .ts-review { border-top: 0; padding: 0; }
.ts-reply-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tm-line); }
img.tm-prov-logo { object-fit: cover; background: var(--tm-surface); border: 1px solid var(--tm-line); }

@media (max-width: 720px) {
  .ts-hero-row { padding: 0 16px 18px; gap: 12px; }
  .ts-logo { width: 76px; height: 76px; margin-top: -32px; border-radius: 16px; }
  .ts-logo-letter { font-size: 32px; }
  .ts-hero-text { flex-basis: 100%; padding-top: 0; }
  .ts-hero-row > .tm-btn { margin-top: 0; width: 100%; }
  .ts-slots, .ts-facts { grid-template-columns: minmax(0, 1fr); }
  .ts-slot { flex-wrap: wrap; }
  .ts-booking { padding: 16px; }
  .ts-booking-top { flex-direction: column; }
}

/* ---------- calendar of open dates ---------- */
.tm-results-head { flex-wrap: wrap; }
.tm-view { display: inline-flex; margin-left: auto; border: 1px solid var(--tm-line); border-radius: 10px; overflow: hidden; }
.tm-view button { padding: 7px 14px; border: 0; background: var(--tm-surface); color: var(--tm-ink-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tm-view button + button { border-left: 1px solid var(--tm-line); }
.tm-view button[aria-pressed="true"] { background: var(--tm-green); color: #fff; }
.tm-link { border: 0; background: none; padding: 0; color: var(--tm-green-deep); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.ts-cal { background: var(--tm-surface); border: 1px solid var(--tm-line); border-radius: var(--tm-radius); padding: 16px; }
.ts-cal-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 12px; }
.ts-cal-head strong { min-width: 170px; text-align: center; font-size: 17px; }
.ts-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ts-cal-dow { padding: 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--tm-ink-2); }
.ts-cal-cell { min-height: 84px; padding: 6px; border-radius: 10px; border: 1px solid var(--tm-line); background: var(--tm-surface); text-align: left; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ts-cal-cell.is-pad { border-color: transparent; background: none; }
.ts-cal-cell.is-past { opacity: 0.55; }
button.ts-cal-cell { cursor: pointer; }
button.ts-cal-cell:hover { border-color: var(--tm-green); }
.ts-cal-cell.has { background: var(--tm-green-soft); border-color: transparent; }
.ts-cal-cell.is-on { outline: 2px solid var(--tm-green); outline-offset: -2px; }
.ts-cal-num { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ts-cal-cell.is-today .ts-cal-num { display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--tm-ink); color: var(--tm-surface); }
.ts-cal-chip { display: block; padding: 1px 6px; border-radius: 6px; background: var(--tm-green); color: #fff; font-size: 11.5px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-cal-more { font-size: 11.5px; color: var(--tm-green-deep); font-weight: 600; }
.ts-cal-dot { display: none; }
.ts-cal-detail { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tm-line); }
.ts-cal-day { margin: 0 0 8px; font-size: 16px; }
.ts-cal-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--tm-line); }
.ts-cal-day + .ts-cal-row { border-top: 0; }
.ts-cal-row > div { min-width: 0; display: grid; gap: 2px; }
.ts-cal-row span { font-size: 13.5px; color: var(--tm-ink-2); }
@media (max-width: 720px) {
  .ts-cal { padding: 12px 8px; }
  .ts-cal-cell { min-height: 46px; padding: 4px; align-items: center; }
  .ts-cal-chip, .ts-cal-more { display: none; }
  .ts-cal-dot { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--tm-green); color: #fff; font-size: 11.5px; font-weight: 700; }
  .ts-cal-dow { text-align: center; padding: 4px 0; }
}

/* ---------- server-made first paint, topics, offers, PRO price note ---------- */
.tm-ssr { max-width: 760px; }
.tm-ssr h1 { font-size: 28px; line-height: 1.2; margin: 12px 0 8px; }
.tm-ssr h2 { font-size: 18px; margin: 22px 0 8px; }
.tm-ssr nav { font-size: 13.5px; color: var(--tm-ink-2); }
.tm-ssr a { color: var(--tm-green-deep); }
.tm-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tm-topics a.tm-chip { text-decoration: none; }
.tm-topics a.tm-chip:hover { border-color: var(--tm-green); }
.ts-pro-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--tm-green-soft); color: var(--tm-green-deep); font-size: 14px; font-weight: 600; }
.ts-offer-msg { margin: 12px 0 8px; padding: 10px 14px; border-left: 3px solid var(--tm-green); background: var(--tm-surface-2); border-radius: 0 10px 10px 0; }
.ts-recap small { color: var(--tm-ink-2); }

/* ============================================================
   Clearer buttons on the training pages (18 Nov 2026)
   - The two paths on the home page each end in a real button.
   - The two sign-ins share one "Sign in:" label and look the same.
   ============================================================ */
.tm-path em { display: inline-flex; align-self: flex-start; align-items: center; margin-top: 10px; padding: 9px 16px; border-radius: 29px; background: var(--tm-green); color: #fff; font-size: 14px; font-weight: 700; }
.tm-path.is-provider em { background: #fff; color: var(--tm-green-deep); }
.tm-paths-note { margin: 12px 0 0 0; font-size: 13.5px; color: var(--tm-ink-2); }
.tm-paths-note a { font-weight: 600; color: var(--tm-green-deep); }
.tm-nav-who { font-size: 13px; font-weight: 600; color: var(--tm-ink-2); white-space: nowrap; }
@media (max-width: 640px) {
  .tm-nav-who { font-size: 12px; }
}
