/* ==========================================================
   TrainyGate — site layer on top of the house kit
   (assets/kit/pl.css + course.css / auth.css / admin.css).
   Brand: ink #0B3A46 · petrol #0E7480 · coral keystone #F26B4A.
   Coral is for accents only; large surfaces use the petrol family.
   ========================================================== */

/* ---------- brand tokens ---------- */
[data-site="trainy"] {
  --brand: #0E7480; --brand-rgb: 14, 116, 128; --brand-ink: #0A5A63;
  --accent: #F26B4A; --accent-rgb: 242, 107, 74; --cta: #C2410C; --cta-ink: #9A3412;
  --deep: #0B3A46; --deep-2: #12505F;
  --ink: #15262C; --muted: #56636B; --page: #F3F5F7; --surface: #ffffff; --surface-2: #EDF1F3; --line: #E1E6EA;
  --side: #0B3A46; --side-ink: #C8DCE0;
  --radius: 20px;
}
[data-site="trainy"][data-bs-theme="dark"] {
  --brand: #1A7C88; --brand-rgb: 26, 124, 136; --brand-ink: #8FD6DD;
  --accent: #F47C5E; --accent-rgb: 244, 124, 94; --cta: #D9542F; --cta-ink: #FDBA9F;
  --deep: #072830; --deep-2: #0B3A46;
  --ink: #E7EFF1; --muted: #9DB0B6; --page: #0A1417; --surface: #101D21; --surface-2: #15262B; --line: #23383E;
  --side: #061D23; --side-ink: #A9C3C8;
}
/* Bootstrap's own colours follow the brand, so its helpers (form-check, links) match the kit */
[data-site="trainy"] { --bs-body-font-family: var(--font); --bs-body-bg: var(--page); --bs-body-color: var(--ink); --bs-link-color: var(--brand-ink); --bs-link-color-rgb: var(--brand-rgb); --bs-border-color: var(--line); --bs-secondary-color: var(--muted); --bs-primary: var(--brand); --bs-primary-rgb: var(--brand-rgb); }

small, .small { font-size: 15px; }
body { font-size: 17px; }
.muted, .text-muted { color: var(--muted) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--ok) !important; }
a { color: var(--brand-ink); }
.th-main { min-height: 50vh; }
.min-w-0 { min-width: 0; }
::selection { background: rgba(var(--brand-rgb), .2); }

/* ---------- logo lockup: mark + name, the other language's name beneath ---------- */
.tg-logo { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.tg-logo:hover { color: var(--ink); }
.tg-mark { width: 44px; height: 44px; flex: 0 0 auto; display: block; }
.tg-name { display: grid; line-height: 1.15; }
.tg-name b { font-size: 21px; font-weight: 800; white-space: nowrap; }
.tg-name b span { color: var(--cta); }
.tg-name small { color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; }
.tg-name small[lang="en"] { letter-spacing: .02em; }
.tg-logo.on-dark, .tg-logo.on-dark:hover { color: #fff; }
.tg-logo.on-dark .tg-name b span { color: var(--accent); }
.tg-logo.on-dark .tg-name small { color: #9FC1C7; }
.tg-logo.on-dark .tg-mark rect { fill: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .tg-name b span { color: var(--accent); }

/* ---------- public header (NavLab core, CourseLab look) ---------- */
.tg-pilot { background: rgba(var(--brand-rgb), .08); border-bottom: 1px solid rgba(var(--brand-rgb), .16); color: var(--brand-ink); font-size: 15px; }
.tg-pilot .wrap { display: flex; align-items: center; gap: .5rem; min-height: 40px; flex-wrap: wrap; padding-block: 4px; }
.tg-pilot a { font-weight: 800; }
.tg-head { background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tg-head .ph-nav { margin-inline-start: .5rem; }
.tg-head .ph-nav a { white-space: nowrap; }
.tg-head .ph-nav a > i { font-size: 1.05rem; }
.tg-lang { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .75rem; border-radius: 12px; color: var(--ink); font-weight: 700; text-decoration: none; }
.tg-lang:hover { background: var(--surface-2); color: var(--ink); }
.tg-user { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding-block: 0; padding-inline: .35rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; max-width: 240px; }
.tg-user:hover { border-color: rgba(var(--brand-rgb), .4); color: var(--ink); }
.tg-user > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-user .av { width: 34px; height: 34px; font-size: 15px; }
.tg-menu-me { display: flex; align-items: center; gap: .7rem; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.tg-menu-me b { display: block; }
.tg-menu-me span { color: var(--muted); font-size: 15px; }
.ph-panel form { margin: 0; }
.ph-panel .tg-panel-acts { display: grid; gap: .5rem; margin-top: auto; }
@media (max-width: 1199.98px) { .tg-head .ph-act .tg-user > span:last-child { display: none; } .tg-head .ph-act .tg-user { padding-inline: .3rem; } }
@media (max-width: 991.98px) { .tg-head .ph-act .hide-m { display: none !important; } }

/* avatar initial (course.css .av) — the hue comes from the name */
.av { --h: 186; }

/* ---------- buttons on top of ButtonLab ---------- */
.btx-cta { background: var(--cta); }
.btx-cta:hover { color: #fff; }
.btx-danger { background: var(--danger); }
.btx-danger:hover { color: #fff; }
.btx-danger-soft { background: var(--danger-bg); color: var(--danger); }
.btx-danger-soft:hover { color: var(--danger); filter: brightness(.97); }
.btx-text { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .4rem; border: 0; background: none; color: var(--brand-ink); font: 700 16px var(--font); text-decoration: none; cursor: pointer; }
.btx-text:hover { text-decoration: underline; text-underline-offset: 4px; color: var(--brand-ink); }
.btx-text.text-danger { color: var(--danger); }
.btx-sm.btx-text { min-height: 40px; font-size: 15px; }
.btx-ghost.text-danger { color: var(--danger) !important; }
.btx.w-100 { width: 100%; }
form.d-inline, form.d-inline-block { display: inline-block; }

/* ---------- page head, sections, boxes ---------- */
.th-page-head { padding: clamp(24px, 3vw, 40px) 0 clamp(12px, 1.5vw, 18px); }
.th-page-head h1 { font-size: clamp(26px, 2.8vw, 36px); margin: 0; }
.th-page-head p { color: var(--muted); margin: .3rem 0 0; }
.th-page-head .btx-text:first-child { padding-inline: 0; margin-bottom: .2rem; }
.th-section { padding-block: clamp(48px, 6vw, 88px) 0; }
.th-section h2 { font-size: clamp(26px, 3vw, 40px); margin-bottom: .3rem; }
.th-section-lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); margin-bottom: clamp(22px, 3vw, 36px); }
.box { margin-top: clamp(16px, 1.6vw, 22px); }                         /* cards never touch: unconditional margin … */
:is(.grid-2, .grid-3, .grid-4, .grid-parties, .kpis, .th-kpi-grid, .ac-two, .ad-content, .tg-cols) > .box { margin-top: 0; } /* … zeroed inside grids, which use gap */
.ad-content > * { margin-top: 0; }
.box-t { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 20px; font-weight: 800; margin: 0 0 1rem; }
.box-t > i { color: var(--brand-ink); }
.box > :last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(16px, 2vw, 24px); }
.th-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); }
.box.h-100, .grid-3 > .box, .grid-2 > .box { height: 100%; }
.th-form-section { font-size: 18px; font-weight: 800; padding-bottom: .5rem; margin: 1.6rem 0 1rem; border-bottom: 1px solid var(--line); }
.th-form-section:first-child { margin-top: .2rem; }

/* ---------- alerts (OverlayLab inline alert look) ---------- */
.note-b { margin-block: 14px; border-radius: 16px; line-height: 1.75; }
.note-b.bad { background: var(--danger-bg); color: var(--danger); }
.note-b.bad > i, .note-b.bad b { color: var(--danger); }
.note-b.ok { color: var(--ink); }
.note-b > ul { margin: 0; padding-inline-start: 1.2rem; }
.note-b .th-note { margin-top: .5rem; }
.tg-flash { padding-top: 14px; }
.tg-flash .note-b { margin: 0; box-shadow: var(--shadow); }

/* ---------- pills / counts ---------- */
.pill.mute, .pill.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.th-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 .45rem; border-radius: 999px; background: var(--cta); color: #fff; font-size: 15px; font-weight: 800; line-height: 1; }
.th-count-soft { display: inline-grid; place-items: center; min-width: 26px; padding: 0 .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 15px; font-weight: 800; }

/* ---------- KPI tiles (AdminLab .kpi for every area) ---------- */
.kpis, .th-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.kpi { display: grid; align-content: start; gap: .15rem; }
.kpi .lbl { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-weight: 700; font-size: 15px; }
.kpi .lbl i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); }
.kpi .val { order: -1; font-size: clamp(24px, 2.2vw, 32px); font-weight: 800; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.kpi .kpi-note { color: var(--muted); font-size: 15px; }
a.th-stat-link { display: block; text-decoration: none; color: inherit; height: 100%; }
a.th-stat-link .box { height: 100%; transition: border-color var(--ease), transform var(--ease); }
a.th-stat-link:hover .box { border-color: rgba(var(--brand-rgb), .4); transform: translateY(-2px); }

/* ---------- tables (AdminLab .tbl, inner scroll on phones) ---------- */
.tbl-frame { min-width: 0; margin-top: clamp(16px, 1.6vw, 22px); border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.tbl th, .tbl td { padding: 12px 16px; text-align: start; vertical-align: middle; border-top: 1px solid var(--line); }
.tbl thead th { background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 15px; white-space: nowrap; border-top: 0; }
.tbl tbody tr { transition: background var(--ease); }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.tbl-frame > .tbl { min-width: 640px; }
.tbl-frame > .tbl.th-table-fit { min-width: 0; }
.tbl .th-sub { color: var(--muted); font-size: 15px; }
.th-table-empty { text-align: center !important; color: var(--muted); padding: 40px 16px !important; }
[dir="rtl"] .tbl [dir="ltr"] { text-align: right; }
.th-row-won td { background: var(--ok-bg); }
.th-row-out td { opacity: .6; }
.th-row-error td { background: var(--danger-bg); }
.th-tree-child td:first-child { padding-inline-start: 40px; }
.th-tree-child td:first-child::before { content: '\21B3'; color: var(--muted); margin-inline-end: 8px; display: inline-block; }
[dir="rtl"] .th-tree-child td:first-child::before { transform: scaleX(-1); }
.th-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.th-actions form { margin: 0; }
.th-compare td { vertical-align: top; }
.th-plan-table { min-width: 1100px; }
.th-plan-table td { padding: 8px 10px; }
.th-plan-table td:nth-child(2) { min-width: 220px; }
.th-plan-table td:nth-child(3) { min-width: 190px; }
.th-plan-table td:nth-child(4), .th-plan-table td:nth-child(5) { width: 96px; }
.th-plan-table td:nth-child(8) { min-width: 200px; }

/* ---------- forms (FormLab parts) ---------- */
.fm-label { display: block; margin-bottom: .35rem; }
.fm-label.th-required::after, .th-required::after { content: ' *'; color: var(--danger); }
.fm-input.fm-sm { min-height: 44px; padding: .35rem .8rem; font-size: 15px; }
textarea.fm-input.fm-sm { min-height: 88px; }
select.fm-input { appearance: none; -webkit-appearance: none; padding-inline-end: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2356636B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 14px; background-position: left 1rem center; cursor: pointer; }
[dir="ltr"] select.fm-input { background-position: right 1rem center; }
select.fm-input[multiple] { background-image: none; padding-inline-end: 1rem; min-height: 140px; }
.fm-input.is-invalid, .is-invalid > .fm-input { border-color: var(--danger) !important; }
.fm-input[readonly], .fm-input:disabled { background: var(--surface-2); color: var(--muted); }
.hint { display: block; margin-top: .3rem; color: var(--muted); font-size: 15px; line-height: 1.7; }
.th-field-error { display: block; margin-top: .3rem; color: var(--danger); font-size: 15px; font-weight: 600; }
.input-group { flex-wrap: nowrap; }
.input-group > .fm-input { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group-text { display: inline-flex; align-items: center; padding: 0 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; }
.input-group > :not(:first-child) { margin-inline-start: -1.5px; }
[dir="rtl"] .input-group > .fm-input:not(:last-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
[dir="rtl"] .input-group > :not(:first-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
[dir="ltr"] .input-group > .fm-input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
[dir="ltr"] .input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.form-check { display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; padding: .5rem 0 0; margin: 0; }
.form-check .form-check-input { float: none; width: 22px; height: 22px; margin: .2rem 0 0; flex: 0 0 auto; border: 1.5px solid var(--line); background-color: var(--surface); cursor: pointer; }
.form-check .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check .form-check-input:focus { box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); border-color: var(--brand); }
.form-switch .form-check-input { width: 46px; height: 26px; border-radius: 26px; }
.form-check-label { cursor: pointer; }
.th-pair-label { margin-bottom: .2rem; }
.th-pair-lang { display: block; color: var(--muted); font-size: 15px; font-weight: 600; margin-bottom: .2rem; }

/* custom select (FormLab .fm-select) built by tg.js over a native <select>; the native one stays in the form */
.tg-sel { position: relative; }
.tg-sel > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.tg-sel-b { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 52px; padding: 0 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 500 16px var(--font); text-align: start; cursor: pointer; }
.tg-sel-b > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-sel-b > i { color: var(--muted); transition: transform var(--ease); flex: 0 0 auto; }
.tg-sel.is-open .tg-sel-b { border-color: rgba(var(--brand-rgb), .7); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14); }
.tg-sel.is-open .tg-sel-b > i { transform: rotate(180deg); }
.tg-sel.fm-sm .tg-sel-b { min-height: 44px; font-size: 15px; }
.tg-sel.is-bad .tg-sel-b { border-color: var(--danger); }
.tg-sel-l { position: absolute; z-index: 40; top: calc(100% + 6px); inset-inline: 0; display: none; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.tg-sel.is-open .tg-sel-l { display: grid; gap: 2px; }
.tg-sel-l [role="option"] { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 44px; padding: .45rem .8rem; border-radius: 10px; cursor: pointer; line-height: 1.5; }
.tg-sel-l [role="option"][aria-selected="true"] { color: var(--brand-ink); font-weight: 800; }
.tg-sel-l [role="option"][aria-selected="true"]::after { content: "\F26E"; font-family: "bootstrap-icons"; }
.tg-sel-l [role="option"].is-active { background: rgba(var(--brand-rgb), .08); }
.tg-sel-l [role="option"][aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.tg-sel-l .tg-grp { padding: .5rem .8rem .2rem; color: var(--muted); font-size: 15px; font-weight: 800; }

/* chips for fields and services (FormLab .fm-chips look) */
.th-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.th-chip { position: relative; display: inline-flex; margin: 0; }
.th-chip > input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.th-chip > input + span { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; transition: all var(--ease); }
.th-chip > input:checked + span { border-color: var(--brand); background: rgba(var(--brand-rgb), .08); color: var(--brand-ink); }
.th-chip > input:checked + span::before { content: '\F26E'; font-family: 'bootstrap-icons'; }
.th-chip > input:focus-visible + span { outline: 3px solid rgba(var(--brand-rgb), .55); outline-offset: 2px; }
.th-chip-sm > input + span { min-height: 40px; padding: 0 .8rem; }
.th-chips-group { margin-bottom: 1rem; }
.th-chips-group-title { font-weight: 800; font-size: 15px; margin-bottom: .5rem; }
.th-chips.is-invalid-group > .th-chip > span { border-color: var(--danger); }

/* file field in the page's own language */
.th-file { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: 5px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.th-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.th-file-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 1rem; margin: 0; border-radius: 10px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-weight: 700; cursor: pointer; }
.th-file-btn:hover { background: rgba(var(--brand-rgb), .16); }
.th-file-input:focus-visible + .th-file-btn { outline: 3px solid rgba(var(--brand-rgb), .55); outline-offset: 2px; }
.th-file-name { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.th-file.has-file { border-style: solid; border-color: rgba(var(--brand-rgb), .4); }
.th-file.has-file .th-file-name { color: var(--ink); font-weight: 700; }

/* repeating price / cost rows */
.th-prices { display: grid; gap: .6rem; }
.th-price-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 170px 150px 110px 44px; gap: .5rem; align-items: center; }
.th-cost-row { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) 140px 160px 44px; }
.th-price-row .th-chip { white-space: nowrap; }
@media (max-width: 991.98px) {
  .th-price-row, .th-cost-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
  .th-price-remove { justify-self: end; }
}

/* photos */
.th-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.th-thumb-sm { width: 64px; height: 48px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--muted); }
.th-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.th-photo { display: grid; gap: .4rem; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.th-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.th-photo-remove { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; color: var(--danger); font-size: 15px; font-weight: 700; cursor: pointer; }

/* ---------- key/value, documents, notes ---------- */
.th-sub { color: var(--muted); font-size: 15px; }
.th-dl { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: .6rem 1.4rem; margin: 0; }
.th-dl dt { color: var(--muted); font-weight: 700; }
.th-dl dd { margin: 0; overflow-wrap: anywhere; }
.th-dl-compact { grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); }
[dir="rtl"] .th-dl dd[dir="ltr"] { text-align: right; }
@media (max-width: 575.98px) { .th-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .th-dl dd { margin-bottom: .7rem; } }
.th-docs { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.th-doc { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.th-doc > i { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.15rem; }
.th-doc a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.th-doc-meta { color: var(--muted); font-size: 15px; }
.th-note { padding: .8rem 1rem; border-radius: 14px; background: var(--surface-2); white-space: pre-line; }
.th-prose { white-space: normal; overflow-wrap: anywhere; }
.th-bullets, .th-steps-list { margin: 0; padding-inline-start: 1.3rem; }
.th-bullets li, .th-steps-list li { margin-bottom: .3rem; }
.th-link { color: var(--brand-ink); cursor: pointer; font-weight: 700; }
.th-file-link { display: inline-flex; gap: .4rem; align-items: center; min-height: 40px; text-decoration: none; font-size: 15px; font-weight: 700; }
.th-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; color: var(--muted); }
.th-facts li { display: inline-flex; align-items: center; gap: .4rem; }
.th-facts i { color: var(--brand-ink); }
.th-breakdown, .th-settlement { width: 100%; margin-top: .4rem; font-size: 16px; }
.th-breakdown td, .th-settlement td { padding: .3rem 0; border: 0; }
.th-breakdown td:last-child, .th-settlement td:last-child { text-align: end; white-space: nowrap; }
.th-breakdown tr.th-total td, .th-settlement tr.th-total td { border-top: 1px dashed var(--line); font-weight: 800; padding-top: .6rem; }
.th-bar { height: 8px; min-width: 80px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.th-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.th-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.th-stats-grid > div { display: grid; padding: .7rem 1rem; border-radius: 14px; background: var(--surface-2); }
.th-stats-grid > div > strong { font-size: 22px; font-weight: 800; }
.th-preflight { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.th-preflight li { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.th-preflight code { color: var(--muted); }

/* links that look like a list row (account shortcuts) */
.th-presence { display: flex; align-items: center; gap: .9rem; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
.th-presence:hover { border-color: rgba(var(--brand-rgb), .4); color: var(--ink); transform: translateY(-1px); }
.th-presence + .th-presence { margin-top: .6rem; }
.th-party-icon { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.45rem; }

/* status panel on account page */
.th-status { display: flex; gap: 1rem; align-items: flex-start; }
.th-status-icon { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 18px; font-size: 1.5rem; }
.th-status-pending .th-status-icon { background: var(--warn-bg); color: var(--warn); }
.th-status-approved .th-status-icon { background: var(--ok-bg); color: var(--ok); }
.th-status-rejected .th-status-icon, .th-status-suspended .th-status-icon { background: var(--danger-bg); color: var(--danger); }
.th-status-unverified .th-status-icon { background: var(--surface-2); color: var(--muted); }

/* tabs and filters */
.th-tabs { display: flex; gap: 4px; margin-bottom: 1.2rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.th-tabs a { display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: 0 1rem; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 800; text-decoration: none; white-space: nowrap; }
.th-tabs a:hover { color: var(--ink); }
.th-tabs a.active, .th-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--brand); }
.th-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1.2rem; }
.th-filters > div { flex: 0 1 220px; min-width: 0; }
.th-filters .th-filter-search { flex: 1 1 280px; }
.th-pager { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; }
.th-pager a, .th-pager span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .6rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.th-pager span.current { background: var(--ink); border-color: var(--ink); color: var(--surface); }

/* two-column page: side + main */
.th-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(16px, 2vw, 24px); align-items: start; }
.th-split-public { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(16px, 2vw, 28px); align-items: start; }
.th-split > .box, .th-split > .tbl-frame, .th-split-public > .box, .th-split-public > div > .box:first-child { margin-top: 0; }
@media (max-width: 991.98px) { .th-split, .th-split-public { grid-template-columns: minmax(0, 1fr); } }

/* tenders */
.th-addendum { border-inline-start: 3px solid var(--brand); padding: .3rem 1rem; margin-bottom: 1rem; }
.th-qa { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 16px; margin-bottom: .7rem; background: var(--surface); }
.th-qa-q, .th-qa-a { display: flex; gap: .7rem; align-items: flex-start; }
.th-qa-q > i { color: var(--ink); font-size: 1.15rem; }
.th-qa-a { margin-top: .7rem; padding-top: .7rem; border-top: 1px dashed var(--line); }
.th-qa-a > i { color: var(--brand-ink); font-size: 1.15rem; }
form.th-qa-a { display: block; }
.th-sealed { display: flex; gap: 1rem; align-items: center; }
.th-sealed > i { width: 64px; height: 64px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 20px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.8rem; }
.th-offer { padding: 1rem; border: 1px solid var(--line); border-radius: 18px; margin-bottom: .9rem; background: var(--surface); }
.th-eval { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.th-eval .fm-input { flex: 1 1 240px; width: auto; }
.th-person { display: flex; gap: .8rem; align-items: center; }

/* reviews */
.th-stars { white-space: nowrap; color: #d97706; }
.th-stars strong { color: var(--ink); }
.th-star-input { border: 0; padding: 0; margin: 0; }
.th-stars-pick { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.th-stars-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.th-stars-pick label { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 26px; color: var(--line); cursor: pointer; line-height: 1; }
.th-stars-pick input:checked ~ label, .th-stars-pick label:hover, .th-stars-pick label:hover ~ label { color: #d97706; }
.th-stars-pick input:focus-visible + label { outline: 3px solid rgba(var(--brand-rgb), .55); border-radius: 8px; }
.th-review { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.th-review:last-child { border-bottom: 0; }
.th-review-reply { margin-top: .5rem; padding: .6rem .9rem; border-radius: 12px; background: var(--surface-2); font-size: 16px; }

/* admin preview of a public page */
.th-preview { position: relative; padding: 22px; border: 2px dashed var(--line); border-radius: 22px; background: var(--surface-2); }
.th-preview-label { position: absolute; top: -15px; inset-inline-start: 22px; padding: .05rem .9rem; border-radius: 999px; background: var(--deep); color: #fff; font-size: 15px; font-weight: 800; }

/* repeating course rows on profiles (details) */
.th-course { border: 1px solid var(--line); border-radius: 16px; margin-bottom: .7rem; background: var(--surface); }
.th-course summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; align-items: center; min-height: 60px; padding: .7rem 1rem; }
.th-course summary::-webkit-details-marker { display: none; }
.th-course summary::after { content: '\F282'; font-family: 'bootstrap-icons'; color: var(--muted); transition: transform var(--ease); }
.th-course[open] { border-color: rgba(var(--brand-rgb), .3); box-shadow: var(--shadow); }
.th-course[open] summary::after { transform: rotate(180deg); }
.th-course-title { flex: 1 1 260px; font-weight: 800; }
.th-course-meta { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.th-course-body { padding: .9rem 1rem 1rem; border-top: 1px solid var(--line); }

/* gallery, capacity, amenities (service listings) */
.th-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 160px; gap: 8px; border-radius: 22px; overflow: hidden; }
.th-gallery a { display: block; }
.th-gallery img { width: 100%; height: 100%; object-fit: cover; }
.th-gallery-main { grid-column: span 2; grid-row: span 2; }
@media (max-width: 575.98px) { .th-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; } }
.th-capacity { display: flex; flex-wrap: wrap; gap: .6rem; }
.th-capacity > div { display: grid; min-width: 120px; padding: .6rem 1rem; border-radius: 14px; background: var(--surface-2); }
.th-amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .4rem 1rem; }
.th-amenities li { display: flex; align-items: center; gap: .5rem; }
.th-amenities i { color: var(--brand-ink); }

/* avatars (photo or initial) */
.th-avatar { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 18px; object-fit: cover; border: 1px solid var(--line); background: var(--surface); }
.th-avatar-lg { width: 120px; height: 120px; border-radius: 28px; }
.th-avatar-empty { display: inline-grid; place-items: center; border: 0; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.8rem; }
.th-avatar-lg.th-avatar-empty { font-size: 3rem; }

/* legal pages */
.th-legal h2 { font-size: 22px; margin-top: 1.8rem; }
.th-legal h2:first-child { margin-top: 0; }

/* plan / register prices */
.th-plan-price { font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.th-register-box { position: sticky; top: calc(var(--head-h) + 16px); }

/* ---------- confirm dialog (native <dialog>, OverlayLab) ---------- */
.tg-confirm .dl-body { display: grid; gap: .7rem; padding: 24px; }
.tg-confirm .ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--warn-bg); color: var(--warn); font-size: 1.4rem; }
.tg-confirm p { margin: 0; font-size: 18px; font-weight: 700; }
.tg-confirm .acts { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: .5rem; }
.tg-note-dlg .dl-body { display: grid; gap: .8rem; }
.tg-note-dlg h3 { font-size: 19px; margin: 0; }

/* ---------- footer (FooterLab F07 · tabs, on the brand's deep petrol) ---------- */
.fx { container-type: inline-size; position: relative; overflow: hidden; font-family: var(--font); line-height: 1.7; }
.fx p { margin: 0; }
:where(.fx) a { color: inherit; text-decoration: none; transition: color var(--ease), background var(--ease), border-color var(--ease); }
.fx-in { position: relative; padding: clamp(28px, 5cqi, 64px) clamp(16px, 4vw, 56px); max-width: 1440px; margin-inline: auto; }
.fx-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; font-size: 15px; }
.fx-legal nav { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; }
.fx-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.tg-foot { margin-top: clamp(56px, 7vw, 96px); background: var(--deep); color: #C8DCE0; }
.tg-foot::before { content: ""; position: absolute; inset-inline-end: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--accent-rgb), .14), transparent); pointer-events: none; }
.f-tabs .top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.8rem; }
.f-tabs .top p { color: #A9C3C8; max-width: 520px; margin-top: .7rem; }
.f-tabs .stats { display: flex; gap: .6rem; flex-wrap: wrap; }
.f-tabs .stats div { min-width: 120px; padding: .6rem 1rem; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: rgba(255,255,255,.04); }
.f-tabs .stats b { display: block; color: #fff; font-size: 26px; font-weight: 800; line-height: 1.3; }
.f-tabs .stats span { color: #A9C3C8; font-size: 15px; }
.f-tabs > .fx-in > input { position: absolute; opacity: 0; pointer-events: none; }
.f-tabs .tablist { display: flex; gap: 4px; width: max-content; max-width: 100%; padding: 5px; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.f-tabs .tablist label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; color: #A9C3C8; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background var(--ease), color var(--ease); }
.f-tabs .tablist label:hover { color: #fff; }
.f-tabs .fpanel { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 1.2rem; }
.f-tabs .fpanel a { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.03); color: #fff; }
.f-tabs .fpanel a:hover { border-color: rgba(var(--accent-rgb), .6); background: rgba(255,255,255,.07); }
.f-tabs .fpanel a > i { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); color: var(--accent); font-size: 1.15rem; }
.f-tabs .fpanel b { display: block; font-weight: 800; }
.f-tabs .fpanel small { display: block; color: #A9C3C8; font-size: 15px; line-height: 1.6; }
.f-tabs input:nth-of-type(1):checked ~ .tablist label:nth-of-type(1), .f-tabs input:nth-of-type(2):checked ~ .tablist label:nth-of-type(2), .f-tabs input:nth-of-type(3):checked ~ .tablist label:nth-of-type(3), .f-tabs input:nth-of-type(4):checked ~ .tablist label:nth-of-type(4), .f-tabs input:nth-of-type(5):checked ~ .tablist label:nth-of-type(5) { background: #fff; color: var(--deep); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.f-tabs input:nth-of-type(1):checked ~ .panels .fpanel:nth-child(1), .f-tabs input:nth-of-type(2):checked ~ .panels .fpanel:nth-child(2), .f-tabs input:nth-of-type(3):checked ~ .panels .fpanel:nth-child(3), .f-tabs input:nth-of-type(4):checked ~ .panels .fpanel:nth-child(4), .f-tabs input:nth-of-type(5):checked ~ .panels .fpanel:nth-child(5) { display: grid; }
.f-tabs input:nth-of-type(1):focus-visible ~ .tablist label:nth-of-type(1), .f-tabs input:nth-of-type(2):focus-visible ~ .tablist label:nth-of-type(2), .f-tabs input:nth-of-type(3):focus-visible ~ .tablist label:nth-of-type(3), .f-tabs input:nth-of-type(4):focus-visible ~ .tablist label:nth-of-type(4), .f-tabs input:nth-of-type(5):focus-visible ~ .tablist label:nth-of-type(5) { outline: 3px solid var(--accent); outline-offset: 2px; }
.f-tabs .fx-legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); color: #A9C3C8; }
.f-tabs .fx-legal a:hover { color: #fff; }
@container (max-width: 760px) { .f-tabs .fpanel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 480px) { .f-tabs .fpanel { grid-template-columns: minmax(0, 1fr); } .fx-legal { flex-direction: column; align-items: flex-start; } }

/* ---------- home: hero with the stone gate (HeroLab H01 split + floating chips) ---------- */
.tg-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(110% 90% at 85% 0%, var(--deep-2) 0%, var(--deep) 58%); }
.tg-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(70% 70% at 30% 40%, #000, transparent); pointer-events: none; }
.tg-hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(40px, 6vw, 88px); }
.tg-hero .eyebrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.tg-hero .eyebrow i { color: var(--accent); }
.tg-hero h1 { color: #fff; font-size: clamp(34px, 4.6vw, 62px); line-height: 1.25; margin: 1rem 0 0; }
.tg-hero h1 em { font-style: normal; color: var(--accent); display: inline-block; }
.tg-hero .lead { color: #C8DCE0; font-size: clamp(17px, 1.5vw, 20px); margin: 1rem 0 1.6rem; max-width: 640px; }
.tg-search { display: flex; gap: 8px; max-width: 640px; padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tg-search > i { align-self: center; margin-inline-start: .6rem; color: var(--muted); font-size: 1.1rem; }
.tg-search input { flex: 1; min-width: 0; min-height: 48px; border: 0; outline: none; background: none; color: #15262C; font: 500 17px var(--font); }
.tg-search .btx { flex: 0 0 auto; }
[data-bs-theme="dark"] .tg-search { background: var(--surface); }
[data-bs-theme="dark"] .tg-search input { color: var(--ink); }
.tg-hero-acts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.tg-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.tg-facts > div { min-width: 130px; padding: .6rem 1rem; border-radius: 16px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); }
.tg-facts > div > b { display: block; color: #fff; font-size: 26px; font-weight: 800; line-height: 1.3; }
.tg-facts > div > span { color: #A9C3C8; font-size: 15px; }
.tg-gate { position: relative; width: 100%; max-width: 580px; aspect-ratio: 560 / 470; margin-inline: auto; }
.tg-gate > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tg-gate-chip { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .5rem; padding-block: 6px; padding-inline: 8px 16px; border-radius: 999px; background: #fff; color: #0B3A46; font-weight: 800; font-size: 15px; white-space: nowrap; text-decoration: none; box-shadow: 0 12px 28px rgba(3,25,31,.3); transition: transform var(--ease); }
.tg-gate-chip:hover { color: #0B3A46; transform: translate(-50%, -54%); }
.tg-gate-chip > i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #E2F1F2; color: #0A5A63; font-size: 15px; }
.tg-gate-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .th-gate-flow { stroke-dasharray: 4 8; animation: tg-flow 1.6s linear infinite; }
  @keyframes tg-flow { to { stroke-dashoffset: -24; } }
}
@media (max-width: 991.98px) { .tg-hero .wrap { grid-template-columns: minmax(0, 1fr); } .tg-gate { max-width: 460px; } }
@media (max-width: 575.98px) {
  .tg-search { flex-wrap: wrap; } .tg-search .btx { width: 100%; }
  .tg-gate-chip { font-size: 15px; padding-inline: 5px 11px; gap: .35rem; } .tg-gate-chip > i { width: 26px; height: 26px; font-size: 13px; }
}

/* field tiles (CourseLab catalog) */
.tg-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.tg-field { display: grid; gap: .3rem; align-content: start; min-height: 112px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.tg-field:hover { color: var(--ink); border-color: rgba(var(--brand-rgb), .4); transform: translateY(-2px); box-shadow: var(--shadow); }
.tg-field > i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.15rem; }
.tg-field > b { font-weight: 800; line-height: 1.5; }
.tg-field > span { color: var(--muted); font-size: 15px; }

/* "who is it for" — party cards (CardKit text-first card with icon) */
.grid-parties { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 1199.98px) { .grid-parties { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .grid-parties { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479.98px) { .grid-parties { grid-template-columns: minmax(0, 1fr); } }
.tg-party { position: relative; display: flex; flex-direction: column; gap: .6rem; height: 100%; padding: clamp(18px, 2vw, 24px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tg-party:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--brand-rgb), .3); }
.tg-party h3 { font-size: 19px; margin: .3rem 0 0; }
.tg-party p { flex: 1; color: var(--muted); margin: 0; font-size: 16px; }
.tg-party .go { display: inline-flex; align-items: center; gap: .4rem; color: var(--brand-ink); font-weight: 800; }
.tg-party.is-free::after { content: attr(data-free); position: absolute; top: 16px; inset-inline-end: 16px; padding: .05rem .7rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 15px; font-weight: 800; }

/* numbered steps */
.tg-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); counter-reset: st; }
@media (max-width: 1199.98px) { .tg-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .tg-steps { grid-template-columns: minmax(0, 1fr); } }
.tg-step { position: relative; padding: clamp(18px, 2vw, 26px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.tg-step::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: .8rem; border-radius: 14px; background: var(--deep); color: #fff; font-weight: 800; font-size: 18px; }
.tg-step:nth-child(2)::before { background: var(--deep-2); }
.tg-step:nth-child(3)::before { background: var(--brand); }
.tg-step:nth-child(4)::before { background: var(--cta); }
.tg-step h3 { font-size: 19px; margin: 0 0 .3rem; }
.tg-step p { color: var(--muted); margin: 0; font-size: 16px; }

/* promise band: the rules that make the platform neutral */
.tg-band { margin-top: clamp(48px, 6vw, 88px); padding-block: clamp(36px, 5vw, 64px); background: var(--surface-2); border-block: 1px solid var(--line); }
.tg-band .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.tg-band h2 { font-size: clamp(26px, 3vw, 40px); margin: .6rem 0 .4rem; }
.tg-band p.lead { color: var(--muted); margin: 0; }
.tg-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tg-rules > div { display: flex; gap: .8rem; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tg-rules > div > i { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 1.15rem; }
.tg-rules b { display: block; }
.tg-rules span { color: var(--muted); font-size: 15px; line-height: 1.7; }
@media (max-width: 991.98px) { .tg-band .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575.98px) { .tg-rules { grid-template-columns: minmax(0, 1fr); } }

/* closing call to action */
.tg-cta { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: center; margin-top: clamp(48px, 6vw, 88px); padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: var(--deep); color: #fff; }
.tg-cta::before { content: ""; position: absolute; inset-inline-start: -80px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--accent-rgb), .22), transparent); }
.tg-cta > * { position: relative; }
.tg-cta h2 { color: #fff; font-size: clamp(24px, 2.8vw, 36px); margin: 0 0 .3rem; }
.tg-cta p { color: #C8DCE0; margin: 0; }
.tg-cta .acts { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 767.98px) { .tg-cta { grid-template-columns: minmax(0, 1fr); } }

/* ---------- catalog layout (CourseLab: filter panel + results) ---------- */
.tg-cat-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(110% 90% at 85% 0%, var(--deep-2) 0%, var(--deep) 60%); }
.tg-cat-hero .wrap { position: relative; padding-block: clamp(28px, 4vw, 56px); }
.tg-cat-hero h1 { color: #fff; font-size: clamp(28px, 3.4vw, 46px); margin: .4rem 0 .3rem; }
.tg-cat-hero p { color: #C8DCE0; margin: 0; max-width: 760px; }
.tg-cat-hero .crumbs { color: #A9C3C8; padding-top: 0; }
.tg-cat-hero .crumbs a:hover { color: #fff; }
.tg-cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1.4rem; }
.tg-cat-tabs a { display: inline-flex; align-items: center; gap: .45rem; min-height: 46px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); color: #C8DCE0; font-weight: 800; text-decoration: none; }
.tg-cat-tabs a:hover { color: #fff; background: rgba(255,255,255,.06); }
.tg-cat-tabs a[aria-current="page"] { background: #fff; border-color: #fff; color: var(--deep); }
.tg-cat-tabs .n { min-width: 24px; padding: 0 .4rem; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 15px; text-align: center; }
.tg-cat-tabs a[aria-current="page"] .n { background: rgba(11,58,70,.1); }
.tg-cat { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: start; padding-top: clamp(20px, 2.4vw, 32px); }
.tg-filter { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 1rem; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.tg-filter h2 { font-size: 18px; margin: 0; }
.tg-filter .fm-field { gap: .3rem; }
.tg-filter .acts { display: flex; gap: .5rem; }
.tg-results-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.tg-results-h b { font-size: 22px; }
@media (max-width: 991.98px) { .tg-cat { grid-template-columns: minmax(0, 1fr); } .tg-filter { position: static; } }

/* directory cards (CourseLab card look: whole card is the link) */
.tg-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tg-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(var(--brand-rgb), .3); }
.tg-card-ph { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 2.2rem; }
.tg-card-ph img { width: 100%; height: 100%; object-fit: cover; }
.tg-card-ph .cc-fmt { z-index: 1; }
.tg-card-b { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: 16px 18px 18px; }
.tg-card-top { display: flex; align-items: center; gap: .8rem; }
.tg-card h3 { margin: 0; font-size: 19px; line-height: 1.45; }
.tg-card h3 a { color: inherit; text-decoration: none; }
.tg-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.tg-card .ex { color: var(--muted); font-size: 16px; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tg-card-ft { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.tg-card-ft b { color: var(--ink); font-size: 18px; }
.tg-card .th-avatar { width: 56px; height: 56px; border-radius: 16px; }

/* ---------- profile page (CourseLab trainer page) ---------- */
.tg-prof { padding-block: clamp(20px, 3vw, 40px) 0; }
.tg-prof-in { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: center; }
.tg-prof h1 { font-size: clamp(30px, 3.6vw, 50px); margin: .6rem 0 .2rem; }
.tg-prof .hl { color: var(--cta-ink); font-weight: 800; font-size: clamp(18px, 1.6vw, 22px); margin: 0 0 .6rem; }
[data-bs-theme="dark"] .tg-prof .hl { color: var(--accent); }
.tg-prof .about { color: var(--muted); font-size: 18px; max-width: 760px; }
.tg-prof-art { position: relative; display: grid; place-items: center; }
.tg-prof-ring { width: min(320px, 70vw); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; padding: 14px; background: conic-gradient(from 200deg, var(--brand), var(--deep), var(--accent), var(--brand)); }
.tg-prof-ring > img, .tg-prof-ring > span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 8px solid var(--page); background: var(--surface); }
.tg-prof-ring > span { display: grid; place-items: center; color: var(--brand-ink); font-size: clamp(72px, 10vw, 120px); font-weight: 800; }
.tg-prof-badge { position: absolute; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-lg); font-weight: 800; font-size: 15px; }
.tg-prof-badge.b1 { top: 12%; inset-inline-start: 4%; } .tg-prof-badge.b2 { bottom: 12%; inset-inline-end: 4%; }
.tg-prof-badge > i { color: var(--ok); }
.tg-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 10px; margin-top: 1.2rem; }
.tg-stat-row > div { padding: .7rem 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tg-stat-row b { display: block; font-size: 24px; font-weight: 800; line-height: 1.3; }
.tg-stat-row span { color: var(--muted); font-size: 15px; }
@media (max-width: 991.98px) { .tg-prof-in { grid-template-columns: minmax(0, 1fr); } .tg-prof-art { order: -1; } .tg-prof-ring { width: min(220px, 60vw); } }

/* ---------- course page (CourseLab course: split hero + sticky enrol card) ---------- */
.tg-course-hero { padding-block: clamp(16px, 2vw, 28px) clamp(20px, 3vw, 36px); border-bottom: 1px solid var(--line); background: var(--surface); }
.tg-course-hero h1 { font-size: clamp(28px, 3.4vw, 46px); margin: .6rem 0 .4rem; }
.tg-course-hero .lead { color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 860px; }
.tg-course-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; margin-top: 1.2rem; }
.tg-course-facts > div { display: grid; gap: .1rem; padding: .8rem 1rem; border-radius: 16px; background: var(--surface-2); }
.tg-course-facts i { color: var(--brand-ink); font-size: 1.2rem; }
.tg-course-facts b { font-weight: 800; }
.tg-course-facts span { color: var(--muted); font-size: 15px; }
.tg-course { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 3vw, 40px); align-items: start; padding-top: clamp(20px, 2.4vw, 32px); }
.tg-course .sum { top: calc(var(--head-h) + 16px); }
@media (max-width: 991.98px) { .tg-course { grid-template-columns: minmax(0, 1fr); } }

/* ---------- account area (AuthLab account shell) ---------- */
.ac-layout { padding-block: clamp(20px, 2.4vw, 36px) 0; }
.ac-nav .who .av { width: 52px; height: 52px; font-size: 20px; }
.ac-nav .grp { margin: 12px 1rem 2px; color: var(--muted); font-size: 15px; font-weight: 800; }
.ac-nav a .th-count { margin-inline-start: auto; }
.ac-main > .th-page-head { padding-top: 0; }
.ac-main > .box:first-of-type, .ac-main > .note-b:first-child { margin-top: 0; }
@media (max-width: 991.98px) { .ac-nav .grp { display: none; } .ac-nav { top: calc(var(--head-h) - 4px); } }

/* ---------- auth pages (AuthLab split) ---------- */
.au-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100dvh; }
.au-form-side { display: flex; flex-direction: column; padding: 0 clamp(16px, 4vw, 64px) 32px; }
.au-form-side .au-top { min-height: 84px; }
.au-form-side .au-body { flex: 1; display: grid; align-items: center; justify-items: center; padding-block: 20px; }
.au-form-side .au-card { box-shadow: none; border: 0; padding: 0; background: none; max-width: 520px; }
.au-art { position: relative; margin: 14px; margin-inline-start: 0; border-radius: 30px; overflow: hidden; color: #fff; background: radial-gradient(110% 90% at 80% 0%, var(--deep-2) 0%, var(--deep) 60%); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 56px); }
.au-art h2 { color: #fff; font-size: clamp(26px, 2.6vw, 38px); margin: 0 0 .5rem; }
.au-art p { color: #C8DCE0; margin: 0; }
.au-art .tg-gate { max-width: 420px; margin-block: 1.5rem; }
.au-art ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.au-art li { display: flex; gap: .7rem; align-items: flex-start; color: #E6F1F3; }
.au-art li > i { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--accent); }
.au-wide .au-card { max-width: 980px; }
.au-wide { grid-template-columns: minmax(0, 1fr); }
.au-wide .au-form-side .au-body { align-items: start; }
.au-card .fm-field + .fm-field { margin-top: 0; }
.au-stack > .note-b { margin: 0; }
@media (max-width: 991.98px) { .au-split { grid-template-columns: minmax(0, 1fr); } .au-art { display: none; } }

/* ---------- admin shell on the brand ---------- */
.ad-side .tg-logo { color: #fff; }
.ad-side .tg-logo .tg-name small { color: var(--side-ink); }
.ad-side .tg-logo .tg-name b span { color: var(--accent); }
.ad-side .tg-mark rect { fill: rgba(255,255,255,.08); }
.side-mini .ad-side .tg-name { display: none; }
.sd-nav .cnt { background: var(--cta); }
.ad-content > .th-page-head { padding: 0; }
.ad-content .tbl-frame, .ad-content .box { margin-top: 0; }
.ad-content form > .box, .ad-content form > .btx { margin-top: clamp(16px, 1.6vw, 22px); }
.ad-content form > .box:first-of-type { margin-top: 0; }
.ad-tabs-row { display: flex; flex-wrap: wrap; gap: .4rem; }

@media print {
  .ph, .tg-pilot, .tg-foot, .ac-nav, .ad-side, .ad-top, .d-print-none { display: none !important; }
  .ac-layout, .ad-app { display: block; }
  body { background: #fff; }
}

/* a page's own .wrap inside a shell that already has the page width */
.ac-main .wrap, .ad-content .wrap, .au-card .wrap { max-width: none; padding-inline: 0; }

/* course card media without a photo: a date tile on the brand colour */
.tg-cc-art { display: grid; place-items: center; background: radial-gradient(120% 120% at 85% 0%, var(--deep-2), var(--deep) 70%); }
.tg-cc-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; }
.tg-cc-date { position: relative; z-index: 1; display: grid; justify-items: center; color: #fff; line-height: 1.1; }
.tg-cc-date b { font-size: clamp(44px, 5vw, 60px); font-weight: 800; }
.tg-cc-date span { font-size: 18px; font-weight: 700; color: #C8DCE0; }
.tg-cc-art .cc-fmt, .tg-cc-art .cc-hot { z-index: 1; }
.cc-hot { color: #0B3A46; }
fieldset.fm-field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.fm-field > legend { float: none; width: auto; padding: 0; }
.sum .seats { margin: 0; }
.sum .fm-chips label { flex: 1 1 auto; }
.sum .fm-chips input + span { width: 100%; justify-content: center; }

.ico.ico-ok { background: var(--ok-bg); color: var(--ok); }
.ico.ico-bad { background: var(--danger-bg); color: var(--danger); }
.au-card .ico { width: 60px; height: 60px; font-size: 1.6rem; border-radius: 18px; }

/* registration: account types as big rows, the form on a full-width card */
.tg-types { display: grid; gap: 10px; }
.tg-type { display: flex; align-items: center; gap: .9rem; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease); }
.tg-type:hover { color: var(--ink); border-color: rgba(var(--brand-rgb), .5); transform: translateY(-1px); box-shadow: var(--shadow); }
.tg-type .tx { flex: 1; display: grid; line-height: 1.5; }
.tg-type .tx b { font-size: 18px; }
.tg-type .tx > span { color: var(--muted); font-size: 15px; }
.tg-type > i { color: var(--muted); }
.tg-reg { margin-top: 1rem; padding: clamp(18px, 3vw, 36px); border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tg-reg-end { display: grid; gap: 1rem; justify-items: start; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.au-wide .au-card > .steps-b { max-width: 640px; }

/* members' dashboard: "what needs you today" tiles (AdminLab overview task tiles) */
.tg-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.tg-task { display: flex; align-items: center; gap: .8rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
.tg-task:hover { color: var(--ink); border-color: rgba(var(--brand-rgb), .4); transform: translateY(-1px); }
.tg-task .ico { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 14px; background: var(--surface-2); color: var(--muted); }
.tg-task.is-on .ico { background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); }
.tg-task.is-late .ico { background: var(--danger-bg); color: var(--danger); }
.tg-task .tx { flex: 1; display: grid; line-height: 1.4; min-width: 0; }
.tg-task .tx > b { font-size: 22px; font-weight: 800; justify-self: start; }
.tg-task .tx > span { color: var(--muted); font-size: 15px; }
.tg-task > i { color: var(--muted); }
.tg-cta.tg-cta-sm { margin-top: clamp(16px, 1.6vw, 22px); padding: clamp(18px, 2.4vw, 28px); border-radius: 24px; }
.tg-cta.tg-cta-sm h2 { font-size: 22px; }

/* admin shell extras */
.ad-content .box-h h2 { display: flex; align-items: center; gap: .5rem; }
.ad-content .box-h h2 > i { color: var(--brand-ink); }
a.box.kpi { color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
a.box.kpi:hover { border-color: rgba(var(--brand-rgb), .4); transform: translateY(-2px); }
.kpi .val { order: 0; }
.kpi svg { display: block; width: 100%; height: 40px; margin-top: 6px; overflow: visible; }
.nt-list li.muted { padding: 12px; }

/* state pages (StateLab): the status code spelled with the brand arch as its middle digit */
.tg-nf { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.tg-digits { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1vw, 14px); direction: ltr; font-size: clamp(110px, 15vw, 220px); font-weight: 800; line-height: 1; color: var(--ink); user-select: none; }
.tg-digits .o { display: grid; width: .8em; height: .8em; }
.tg-digits .o .tg-mark { width: 100%; height: 100%; filter: drop-shadow(0 26px 40px rgba(11, 58, 70, .3)); }
.tried { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; color: var(--muted); font-size: 15px; }
.tried code { padding: .1rem .6rem; border-radius: 8px; background: var(--surface-2); color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-search.tg-search-line { box-shadow: none; border: 1.5px solid var(--line); max-width: 560px; }
@media (max-width: 991.98px) { .tg-nf { grid-template-columns: minmax(0, 1fr); } .tg-digits { order: -1; } }

/* empty states (tables and lists): a soft icon tile above one plain sentence */
.th-table-empty, .th-box-empty { text-align: center !important; color: var(--muted); padding: 44px 16px !important; }
.th-table-empty > .bi-inbox, .th-box-empty > .bi-inbox { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: var(--surface-2); color: var(--brand); font-size: 26px; }

/* contact / feedback (PageLab contact): form beside a deep panel */
.tg-contact { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tg-contact .box { margin-top: 0; }
.tg-contact-side { border-radius: var(--radius-lg, 22px); padding: clamp(22px, 3vw, 36px); color: #fff; background: radial-gradient(120% 90% at 100% 0%, var(--deep-2) 0%, var(--deep) 60%); position: sticky; top: 96px; }
.tg-contact-side h2 { font-size: 22px; margin: 0 0 1rem; color: #fff; }
.tg-mini-steps { list-style: none; margin: 0; padding: 0; counter-reset: ms; display: grid; gap: 16px; }
.tg-mini-steps > li { counter-increment: ms; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; }
.tg-mini-steps > li::before { content: counter(ms); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .12); color: var(--accent); font-weight: 800; }
.tg-mini-steps > li > b { font-size: 17px; }
.tg-mini-steps > li > span { color: rgba(255, 255, 255, .78); font-size: 15px; }
/* a finished action (feedback sent) */
.tg-done { text-align: center; padding: clamp(32px, 5vw, 64px) 20px; }
.tg-done > .ico { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; background: var(--ok-bg, #E6F4EA); color: var(--ok, #157F3B); font-size: 34px; }
.tg-done h2 { font-size: 24px; margin: 0 0 .4rem; }
.tg-done .btx { margin-top: 1rem; }
.th-box-empty .h4 { margin-bottom: .2rem; }
.tg-tips .th-bullets { margin: 0; }
.tg-pay { max-width: 560px; margin: clamp(30px, 8vh, 90px) auto; }
@media (max-width: 991.98px) { .tg-contact { grid-template-columns: minmax(0, 1fr); } .tg-contact-side { position: static; } }

/* switches: the off state must be visible (Bootstrap's default track is almost white) */
.form-switch .form-check-input { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2356636B'/%3e%3c/svg%3e"); }
.form-switch .form-check-input:not(:checked) { border-color: #A9B6BD; background-color: var(--surface-2); }
[data-bs-theme="dark"] .form-switch .form-check-input:not(:checked) { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239DB0B6'/%3e%3c/svg%3e"); border-color: #4A6168; }
/* KPI rows: a short last row stretches to the full width instead of leaving one narrow tile */
.kpis { display: flex; flex-wrap: wrap; }
.kpis > * { flex: 1 1 220px; min-width: 0; }
.th-sec-h { font-size: 20px; margin: 30px 0 14px; }
.th-sec-h:first-child { margin-top: 0; }
.tbl .th-actions { flex-wrap: nowrap; white-space: nowrap; }

/* ===== PrintLab invoice (doc.css, scoped to .doc-sheet: the site already uses .sheet for the phone menu) ===== */
.doc-desk { padding: clamp(14px, 2vw, 24px); border-radius: var(--radius-lg, 22px); background: #E3E7EB; margin-top: clamp(16px, 1.6vw, 22px); overflow: hidden; }
[data-bs-theme="dark"] .doc-desk { background: #0E1A1E; }
.doc-sheet { --d-brand: #0E7480; --d-ink: #0A5A63; --d-tint: #E7F3F4; --d-line: #D9DEE6; --d-soft: #F5F7F9; --d-muted: #5D6474;
  position: relative; width: 210mm; min-height: 297mm; margin: 0 auto; padding: 14mm 14mm 16mm; background: #fff; color: #161B28;
  font: 10.5pt/1.75 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 18px 50px rgba(0,0,0,.14);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-sheet h1, .doc-sheet h3 { margin: 0; line-height: 1.35; font-weight: 800; color: inherit; }
.doc-sheet p { margin: 0; }
.doc-sheet .num { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.doc-sheet td.num { display: table-cell; }
.doc-sheet .muted { color: var(--d-muted); }
.doc-sheet .mono { font-family: Consolas, Menlo, 'Courier New', monospace; direction: ltr; unicode-bidi: isolate; }
.doc-sheet .d-head { display: grid; grid-template-columns: 1fr auto; gap: 8mm; align-items: start; padding-bottom: 5mm; border-bottom: 2.5px solid var(--d-brand); }
.doc-sheet .d-logo { display: flex; align-items: center; gap: 3mm; }
.doc-sheet .d-logo .mk { width: 14mm; height: 14mm; flex: 0 0 auto; }
.doc-sheet .d-logo .mk .tg-mark { width: 100%; height: 100%; display: block; }
.doc-sheet .d-logo b { display: block; font-size: 16pt; line-height: 1.2; color: #0B3A46; }
.doc-sheet .d-logo span { color: var(--d-muted); font-size: 9pt; }
.doc-sheet .d-title { text-align: left; }
.doc-sheet .d-title h1 { font-size: 20pt; color: var(--d-ink); }
.doc-sheet .d-title .en { display: block; font-size: 10pt; color: var(--d-muted); font-weight: 600; letter-spacing: .5px; direction: ltr; }
.doc-sheet .d-meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 5mm 0; border: 1px solid var(--d-line); border-radius: 3mm; overflow: hidden; }
.doc-sheet .d-meta > div { padding: 2.5mm 4mm; border-inline-start: 1px solid var(--d-line); }
.doc-sheet .d-meta > div:first-child { border-inline-start: 0; }
.doc-sheet .d-meta > div > span { display: block; color: var(--d-muted); font-size: 8.5pt; }
.doc-sheet .d-meta b { font-size: 11pt; }
.doc-sheet .d-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin-bottom: 5mm; }
.doc-sheet .d-party { padding: 4mm 5mm; border-radius: 3mm; background: var(--d-soft); }
.doc-sheet .d-party h3 { font-size: 9pt; color: var(--d-ink); margin-bottom: 1mm; }
.doc-sheet .d-party b { display: block; font-size: 12pt; }
.doc-sheet .d-party p { color: var(--d-muted); font-size: 9.5pt; line-height: 1.6; }
.doc-sheet table.d-tbl { width: 100%; border-collapse: collapse; font-size: 10pt; }
.doc-sheet .d-tbl thead { display: table-header-group; }
.doc-sheet .d-tbl th { padding: 2.5mm 3mm; background: var(--d-brand); color: #fff; font-weight: 700; font-size: 9pt; text-align: start; }
.doc-sheet .d-tbl th:first-child { border-radius: 0 2mm 0 0; } .doc-sheet .d-tbl th:last-child { border-radius: 2mm 0 0 0; }
.doc-sheet .d-tbl td { padding: 2mm 3mm; border-bottom: 1px solid var(--d-line); vertical-align: top; }
.doc-sheet .d-tbl tr { break-inside: avoid; }
.doc-sheet .d-tbl .r { text-align: left; }
.doc-sheet .d-tbl td small { display: block; color: var(--d-muted); font-size: 8.5pt; }
.doc-sheet .d-totals { display: grid; grid-template-columns: 1fr 75mm; gap: 8mm; margin-top: 5mm; break-inside: avoid; }
.doc-sheet .d-totals > div:first-child { position: relative; min-height: 30mm; }
.doc-sheet .d-cur { position: absolute; bottom: 0; inset-inline-start: 0; font-size: 9.5pt; }
.doc-sheet .d-sum { border: 1px solid var(--d-line); border-radius: 3mm; overflow: hidden; }
.doc-sheet .d-sum > div { display: flex; justify-content: space-between; padding: 2mm 4mm; border-top: 1px solid var(--d-line); }
.doc-sheet .d-sum > div:first-child { border-top: 0; }
.doc-sheet .d-sum .tot { background: var(--d-brand); color: #fff; font-weight: 800; font-size: 13pt; }
.doc-sheet .d-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-top: 6mm; padding-top: 4mm; border-top: 1px solid var(--d-line); break-inside: avoid; font-size: 9.5pt; }
.doc-sheet .d-foot h3 { font-size: 9pt; color: var(--d-ink); margin-bottom: 1mm; }
.doc-sheet .d-foot p + p { margin-top: 2mm; }
.doc-sheet .stamp { position: absolute; top: 0; left: 6mm; z-index: 1; padding: 2mm 6mm; border: 3px solid currentColor; border-radius: 3mm; font-size: 20pt; font-weight: 800; transform: rotate(-12deg); opacity: .6; pointer-events: none; }
.doc-sheet .stamp.paid { color: #15803D; } .doc-sheet .stamp.due { color: #A15C07; } .doc-sheet .stamp.draft { color: #8A90A0; }
.tg-inv-pay { margin-top: 0; }
@page { size: A4; margin: 12mm 12mm 16mm; }
@media print {
  .doc-desk { padding: 0; background: none; margin: 0; border-radius: 0; overflow: visible; }
  .doc-sheet { width: auto; min-height: 0; padding: 0; box-shadow: none; zoom: 1 !important; }
  body:has(.doc-desk) .ac-main > .wrap > :not(.doc-desk), body:has(.doc-desk) .ac-main > :not(.wrap) { display: none !important; }
}

/* legal pages (PageLab article): deep band, sticky contents beside numbered sections */
.tg-legal-hero { background: radial-gradient(120% 140% at 100% 0%, var(--deep-2) 0%, var(--deep) 60%); color: #fff; padding: clamp(28px, 4vw, 52px) 0 clamp(30px, 4vw, 56px); }
.tg-legal-hero .crumbs, .tg-legal-hero .crumbs a { color: rgba(255, 255, 255, .78); }
.tg-legal-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 46px); margin: .4rem 0 .3rem; }
.tg-legal-hero p { color: rgba(255, 255, 255, .82); font-size: 18px; margin: 0 0 1rem; }
.tg-legal-other { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 1rem; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 700; text-decoration: none; }
.tg-legal-other:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.tg-legal { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; margin-top: clamp(20px, 2.4vw, 32px); margin-bottom: clamp(30px, 4vw, 56px); }
.tg-legal-toc { position: sticky; top: 96px; padding: 18px; border-radius: var(--radius-lg, 22px); background: var(--surface); border: 1px solid var(--line); }
.tg-legal-toc > b { display: block; margin-bottom: .5rem; }
.tg-legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tg-legal-toc a { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 4px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.tg-legal-toc a:hover, .tg-legal-toc a:focus-visible { background: var(--surface-2); color: var(--brand); }
.tg-legal .n { flex: 0 0 auto; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); color: var(--brand); font-size: 15px; font-weight: 800; }
.tg-legal-body { margin-top: 0; padding: clamp(20px, 3vw, 40px); }
.tg-legal-body section { scroll-margin-top: 100px; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.tg-legal-body section + section { padding-top: 1.4rem; }
.tg-legal-body section:last-child { border-bottom: 0; padding-bottom: 0; }
.tg-legal-body h2 { display: flex; align-items: center; gap: .7rem; font-size: 22px; margin: 0 0 .6rem; }
.tg-legal-body h2 .n { background: var(--deep); color: #fff; }
.tg-legal-body p { margin: 0; font-size: 17px; line-height: 1.9; color: var(--ink); }
.tg-legal-ask { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tg-legal-ask > .ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); color: var(--brand); font-size: 24px; }
.tg-legal-ask > div { flex: 1 1 260px; display: grid; }
.tg-legal-ask > div > span { color: var(--muted); }
@media (max-width: 991.98px) { .tg-legal { grid-template-columns: minmax(0, 1fr); } .tg-legal-toc { position: static; } }

/* install page */
.tg-install { padding-bottom: 48px; }
.tg-install .grid-3 { margin-top: clamp(16px, 1.6vw, 22px); align-items: start; }
.tg-step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--deep); color: #fff; font-size: 16px; font-weight: 800; vertical-align: middle; }

/* phones: the header row must fit 375px (menu, logo, one action); the theme switch moves into the menu */
.ph-panel .tg-panel-theme { display: none; }
@media (max-width: 575.98px) {
  .tg-head .ph-in { gap: 10px; }
  .tg-head .ph-act [data-theme-toggle] { display: none; }
  .ph-panel .tg-panel-theme { display: inline-flex; }
  .tg-head .tg-logo .tg-mark { width: 38px; height: 38px; }
  .tg-head .ph-act .btx-cta { padding-inline: .8rem; }
}
/* sign-in / sign-up column: the card may never grow past the phone width */
.au-form-side .au-body { grid-template-columns: minmax(0, 1fr); }
.au-form-side .au-card { min-width: 0; }
/* step bars on phones: the other steps shrink to their number so every step fits */
@media (max-width: 575.98px) {
  .steps-b li:not([aria-current="step"]) { flex: 0 0 auto; gap: 0; padding-inline: 8px; font-size: 0; }
  .steps-b li::before { font-size: 15px; }
}
/* admin content: wide tables scroll inside their frame instead of widening the page */
.ad-content { grid-template-columns: minmax(0, 1fr); }
.ad-content > * { min-width: 0; }
/* hero numbers fill their row (on phones two per row, edge to edge) */
.tg-facts > div { flex: 1 1 130px; }

/* ===== home: fields as a bento (CardKit bento + ButtonLab icon tiles) =====
   The busiest field leads in a deep tile; every other field shows what it really holds, never a dead "0". */
.tg-fb { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); grid-auto-flow: dense; gap: 14px; }
.tg-fb-lead { grid-column: span 2; grid-row: span 2; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 2.4vw, 32px); border-radius: 26px; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, var(--deep-2) 0%, var(--deep) 62%); box-shadow: 0 24px 50px rgba(11, 58, 70, .28); }
.tg-fb-lead > * { position: relative; z-index: 1; }
.tg-fb-arch { position: absolute !important; z-index: 0 !important; inset-inline-end: -40px; bottom: -50px; width: 270px; height: 270px; color: #fff; opacity: .06; }
.tg-fb-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .8rem; border-radius: 999px; background: rgba(242, 107, 74, .16); color: #FFB59F; font-size: 15px; font-weight: 700; }
.tg-fb-lead .tg-fb-ic { width: 64px; height: 64px; border-radius: 20px; font-size: 30px; background: var(--accent); color: #fff; box-shadow: 0 14px 28px rgba(242, 107, 74, .35); }
.tg-fb-lead h3 { margin: 0; color: #fff; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.35; }
.tg-fb-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.tg-fb-nums > div { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); }
.tg-fb-nums dt { color: #A9C3C8; font-size: 15px; font-weight: 600; }
.tg-fb-nums dd { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.2; }
.tg-fb-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.tg-fb-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.tg-fb-ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.tg-fb-tile { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 168px; padding: 18px 18px 16px; border-radius: 22px;
  background: linear-gradient(160deg, var(--surface) 55%, rgba(var(--brand-rgb), .07)); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), color var(--ease), border-color var(--ease); }
.tg-fb-ic { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 auto; border-radius: 16px; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--deep) 100%); box-shadow: 0 10px 20px rgba(var(--brand-rgb), .25); transition: background var(--ease), transform var(--ease); }
.tg-fb-wm { position: absolute; z-index: -1; inset-inline-end: -14px; bottom: -22px; font-size: 110px; line-height: 1; color: var(--brand); opacity: .06; transition: opacity var(--ease), transform var(--ease); }
.tg-fb-tile > b { font-size: 18px; font-weight: 800; line-height: 1.5; }
.tg-fb-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tg-fb-meta > span { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 15px; font-weight: 600; }
.tg-fb-meta > span.hot { background: rgba(242, 107, 74, .12); color: var(--cta); }
.tg-fb-first { margin-top: auto; color: var(--muted); font-size: 15px; font-weight: 600; }
.tg-fb-first > i { color: var(--accent); }
.tg-fb-go { position: absolute; top: 18px; inset-inline-end: 18px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--brand); opacity: 0; transform: translateX(6px); transition: opacity var(--ease), transform var(--ease); }
[dir="rtl"] .tg-fb-go { transform: translateX(-6px); }
.tg-fb-tile:hover, .tg-fb-tile:focus-visible { color: #fff; background: linear-gradient(160deg, var(--deep-2), var(--deep)); border-color: transparent; transform: translateY(-4px); box-shadow: 0 20px 40px rgba(11, 58, 70, .25); }
.tg-fb-tile:hover .tg-fb-ic, .tg-fb-tile:focus-visible .tg-fb-ic { background: var(--accent); transform: rotate(-6deg); }
.tg-fb-tile:hover .tg-fb-wm, .tg-fb-tile:focus-visible .tg-fb-wm { color: #fff; opacity: .1; transform: scale(1.08); }
.tg-fb-tile:hover .tg-fb-meta > span, .tg-fb-tile:focus-visible .tg-fb-meta > span { background: rgba(255, 255, 255, .12); color: #fff; }
.tg-fb-tile:hover .tg-fb-first, .tg-fb-tile:focus-visible .tg-fb-first { color: #C8DCE0; }
.tg-fb-tile:hover .tg-fb-go, .tg-fb-tile:focus-visible .tg-fb-go { opacity: 1; transform: none; }
/* touch screens have no hover: the arrow is always there */
@media (hover: none) { .tg-fb-go { opacity: 1; transform: none; } }
.tg-fb-tile.is-empty { background: var(--surface); }
.tg-fb-more { border-style: dashed; border-width: 1.5px; background: transparent; }
.tg-fb-more .tg-fb-ic { background: var(--surface-2); color: var(--brand); box-shadow: none; }
[data-bs-theme="dark"] .tg-fb-tile { background: linear-gradient(160deg, var(--surface) 55%, rgba(var(--brand-rgb), .14)); }
[data-bs-theme="dark"] .tg-fb-more { background: transparent; }
@media (max-width: 575.98px) { .tg-fb-lead { grid-column: auto; grid-row: auto; } .tg-fb-tile { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .tg-fb-tile, .tg-fb-ic, .tg-fb-wm, .tg-fb-go { transition: none; } }
/* admin: icon picker for a training field */
.tg-icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.tg-icon-pick label { position: relative; }
.tg-icon-pick input { position: absolute; opacity: 0; inset: 0; }
.tg-icon-pick input + span { display: grid; place-items: center; height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; cursor: pointer; }
.tg-icon-pick input:checked + span { border-color: var(--brand); background: rgba(var(--brand-rgb), .1); color: var(--brand); }
.tg-icon-pick input:focus-visible + span { box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .2); }
.tg-tax-ic { color: var(--brand); }
@media (min-width: 1200px) { .tg-fb { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tg-fb-lead { grid-column: span 3; } }
/* phones: each field is a compact row, icon beside the name */
@media (max-width: 575.98px) {
  .tg-fb { gap: 10px; }
  .tg-fb-tile { display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 14px; border-radius: 18px; }
  .tg-fb-tile > .tg-fb-ic { grid-row: span 2; }
  .tg-fb-tile > b { font-size: 17px; padding-inline-end: 34px; }
  .tg-fb-tile > .tg-fb-meta, .tg-fb-tile > .tg-fb-first { margin-top: 0; grid-column: 2; }
  .tg-fb-wm { font-size: 80px; bottom: -18px; }
  .tg-fb-go { top: 50%; margin-top: -17px; }
}
/* hover/focus must win over every resting variant (empty field, "not listed" tile, dark mode),
   otherwise the text turns white on a light background */
html .tg-fb .tg-fb-tile:hover, html .tg-fb .tg-fb-tile:focus-visible { color: #fff; background: linear-gradient(160deg, var(--deep-2), var(--deep)); border-color: transparent; border-style: solid; }
html .tg-fb .tg-fb-tile:hover .tg-fb-ic, html .tg-fb .tg-fb-tile:focus-visible .tg-fb-ic { background: var(--accent); color: #fff; }
/* mid widths (992–1199px): the header holds logo, three links and four actions, so the link icons give way */
@media (min-width: 992px) and (max-width: 1199.98px) { .tg-head .ph-nav a > i { display: none; } }

/* ===== home: who it is for (PageLab audience tabs) ===== */
.tg-aud { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); align-items: stretch; }
.tg-aud-side h2 { font-size: clamp(28px, 3.2vw, 44px); margin: .6rem 0 .3rem; }
.tg-aud-tabs { display: grid; gap: 8px; margin-top: 1.4rem; }
.tg-aud-tabs button { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); font: 800 18px var(--font); text-align: start; cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease); }
.tg-aud-tabs button .ic { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 14px; background: var(--surface-2); color: var(--brand); font-size: 20px; transition: background var(--ease), color var(--ease); }
.tg-aud-tabs button .nm { flex: 1; }
.tg-aud-tabs button .fr { padding: .05rem .7rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 15px; font-weight: 800; }
.tg-aud-tabs button:hover { border-color: rgba(var(--brand-rgb), .4); transform: translateX(-3px); }
[dir="ltr"] .tg-aud-tabs button:hover { transform: translateX(3px); }
.tg-aud-tabs button[aria-selected="true"] { background: linear-gradient(160deg, var(--deep-2), var(--deep)); border-color: transparent; color: #fff; box-shadow: 0 14px 30px rgba(11, 58, 70, .22); transform: none; }
.tg-aud-tabs button[aria-selected="true"] .ic { background: var(--accent); color: #fff; }
.tg-aud-tabs button[aria-selected="true"] .fr { background: rgba(255, 255, 255, .14); color: #fff; }
.tg-aud-tabs button:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .4); outline-offset: 2px; }
.tg-aud-stage { position: relative; display: grid; }
.tg-aud-panel { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3.4vw, 48px); border-radius: 30px;
  background: radial-gradient(90% 70% at 0% 100%, rgba(242, 107, 74, .1), transparent 60%), radial-gradient(110% 90% at 100% 0%, rgba(var(--brand-rgb), .14), transparent 60%), var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: tgAudIn .35s ease; }
.tg-aud-panel[hidden] { display: none; }
@keyframes tgAudIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tg-aud-wm { position: absolute; z-index: -1; inset-inline-end: -30px; bottom: -50px; font-size: 300px; line-height: 1; color: var(--brand); opacity: .06; }
.tg-aud-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tg-aud-ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; font-size: 34px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--deep)); box-shadow: 0 16px 32px rgba(var(--brand-rgb), .3); }
.tg-aud-count { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 15px; font-weight: 700; }
.tg-aud-count i { color: var(--brand); }
.tg-aud-panel h3 { margin: .2rem 0 0; font-size: clamp(28px, 3vw, 40px); }
.tg-aud-pitch { margin: 0; color: var(--muted); font-size: 18px; }
.tg-aud-ticks { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .7rem; }
.tg-aud-ticks li { display: flex; gap: .7rem; align-items: flex-start; font-weight: 600; }
.tg-aud-ticks li::before { content: "\F26E"; font-family: "bootstrap-icons"; flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; margin-top: .15rem; border-radius: 50%; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); font-size: 1.05rem; }
.tg-aud-acts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: .8rem; }
.tg-aud-free { display: inline-flex; align-items: center; gap: .4rem; color: var(--ok); font-weight: 700; }
@media (max-width: 991.98px) { .tg-aud { grid-template-columns: minmax(0, 1fr); } .tg-aud-tabs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); } }
@media (max-width: 575.98px) { .tg-aud-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tg-aud-tabs button { min-height: 56px; font-size: 16px; padding: 8px 10px; } .tg-aud-tabs button .ic { width: 36px; height: 36px; font-size: 17px; } .tg-aud-tabs button .fr { display: none; } .tg-aud-wm { font-size: 200px; } }

/* ===== home: how it works, a connected timeline ===== */
.tg-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.tg-flow-step { position: relative; display: grid; gap: 14px; align-content: start; }
.tg-flow-n { position: relative; display: flex; align-items: center; }
.tg-flow-n > span { position: relative; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--deep); color: #fff; font-size: 22px; font-weight: 800; box-shadow: 0 0 0 6px var(--page), 0 10px 22px rgba(11, 58, 70, .25); }
.tg-flow-step:last-child .tg-flow-n > span { background: var(--accent); }
/* the line that joins the numbers */
.tg-flow-step:not(:last-child) .tg-flow-n::after { content: ""; position: absolute; top: 50%; inset-inline-start: 56px; width: calc(100% - 56px + clamp(14px, 2vw, 24px)); border-top: 3px dashed rgba(var(--brand-rgb), .35); }
.tg-flow-card { height: 100%; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tg-flow-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(var(--brand-rgb), .35); }
.tg-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tg-flow-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(var(--brand-rgb), .1); color: var(--brand); font-size: 22px; }
.tg-flow-step:last-child .tg-flow-ic { background: rgba(242, 107, 74, .12); color: var(--cta); }
.tg-flow-who { padding: .1rem .75rem; border-radius: 999px; font-size: 15px; font-weight: 800; }
.tg-flow-who.is-entity { background: rgba(11, 58, 70, .08); color: var(--deep); }
.tg-flow-who.is-center { background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); }
[data-bs-theme="dark"] .tg-flow-who.is-entity { background: rgba(255, 255, 255, .08); color: var(--ink); }
.tg-flow-card h3 { font-size: 20px; margin: 0 0 .3rem; }
.tg-flow-card p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 991.98px) {
  .tg-flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tg-flow-step { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding-bottom: 16px; }
  .tg-flow-step:not(:last-child) .tg-flow-n::after { top: 56px; inset-inline-start: 26px; width: 0; height: calc(100% + 16px - 56px); border-top: 0; border-inline-start: 3px dashed rgba(var(--brand-rgb), .35); }
  .tg-flow-n { align-items: flex-start; }
}

/* ===== home: neutrality rules on a deep band ===== */
.tg-band.tg-band-deep { position: relative; overflow: hidden; color: #fff; border: 0; background: radial-gradient(110% 120% at 100% 0%, var(--deep-2) 0%, var(--deep) 58%); }
.tg-band-arch { position: absolute; inset-inline-start: -60px; bottom: -90px; width: 420px; height: 420px; color: #fff; opacity: .05; pointer-events: none; }
.tg-band-deep .wrap { position: relative; }
.tg-band-deep h2 { color: #fff; }
.tg-band-deep p.lead { color: #B9D0D4; }
.tg-band-deep .eyebrow { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }
.tg-band-deep .tg-rules { gap: 14px; }
.tg-rule { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-content: start; padding: 20px; border-radius: 22px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background var(--ease), transform var(--ease); }
.tg-rule:hover { background: rgba(255, 255, 255, .1); transform: translateY(-3px); }
.tg-rule-ic { grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(242, 107, 74, .16); color: #FFB59F; font-size: 22px; }
.tg-rule > b { color: #fff; font-size: 18px; }
.tg-rule > span { color: #B9D0D4; font-size: 15px; line-height: 1.75; }
/* the rule tiles beat the older .tg-rules > div / .tg-rules span rules */
.tg-band-deep .tg-rules > .tg-rule { display: grid; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); box-shadow: none; }
.tg-band-deep .tg-rules > .tg-rule:hover { background: rgba(255, 255, 255, .1); }
.tg-band-deep .tg-rules > .tg-rule > .tg-rule-ic { color: #FFB59F; font-size: 22px; line-height: 1; }
.tg-band-deep .tg-rules > .tg-rule > span:not(.tg-rule-ic) { color: #B9D0D4; font-size: 15px; }
/* the first party shows at once; only a switch animates */
.tg-aud-panel:first-child { animation: none; }
@media (min-width: 992px) { .tg-flow-step { grid-template-rows: auto 1fr; } }

/* ===== directory: people cards (CardKit profile: cover band, overlapping avatar, number strip) ===== */
.tg-pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.tg-pc { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tg-pc:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--brand-rgb), .3); }
.tg-pc-cover { position: relative; height: 92px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 14px;
  background: radial-gradient(120% 140% at 100% 0%, var(--deep-2), var(--deep) 65%); }
.tg-pc.is-trainer .tg-pc-cover { background: radial-gradient(120% 140% at 0% 0%, #12707B, var(--deep) 70%); }
.tg-pc-cover::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; }
.tg-pc-type { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 15px; font-weight: 700; }
.tg-pc-cover > :not(.tg-pc-type) { position: relative; z-index: 1; }
.tg-pc-av { position: relative; z-index: 2; width: 84px; height: 84px; margin: -42px 18px 0; border-radius: 26px; padding: 4px; background: var(--surface); box-shadow: 0 10px 24px rgba(11, 58, 70, .18); }
.tg-pc-av img, .tg-pc-av > span { width: 100%; height: 100%; border-radius: 22px; object-fit: cover; }
.tg-pc-av > span { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--deep)); color: #fff; font-size: 36px; font-weight: 800; }
.tg-pc.is-trainer .tg-pc-av, .tg-pc.is-trainer .tg-pc-av img, .tg-pc.is-trainer .tg-pc-av > span { border-radius: 50%; }
.tg-pc-b { display: flex; flex-direction: column; gap: .4rem; padding: 10px 18px 0; flex: 1; }
.tg-pc h3 { margin: 0; font-size: 19px; line-height: 1.45; }
.tg-pc h3 a { color: inherit; text-decoration: none; }
.tg-pc h3 a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.tg-pc-head { margin: 0; color: var(--brand-ink); font-weight: 700; font-size: 15px; }
.tg-pc-ex { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tg-pc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .2rem; }
.tg-pc-chips > span { padding: .05rem .65rem; border-radius: 999px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 15px; font-weight: 700; }
.tg-pc-chips > span.more { background: var(--surface-2); color: var(--muted); }
.tg-pc-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 18px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tg-pc-nums > div { padding: 8px 6px; text-align: center; border-inline-start: 1px solid var(--line); }
.tg-pc-nums > div:first-child { border-inline-start: 0; }
.tg-pc-nums dt { color: var(--muted); font-size: 15px; font-weight: 600; }
.tg-pc-nums dd { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); }
.tg-pc-nums dd .bi-star-fill { color: #E9A23B; font-size: 16px; }
.tg-pc-nums dd .none { display: inline-block; padding: 0 .55rem; border-radius: 999px; background: rgba(242, 107, 74, .12); color: var(--cta); font-size: 15px; font-weight: 800; }
.tg-pc-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 18px 16px; color: var(--muted); font-size: 15px; }
.tg-pc-ft .go { display: inline-flex; align-items: center; gap: .35rem; color: var(--brand); font-weight: 800; transition: gap var(--ease); }
.tg-pc:hover .tg-pc-ft .go { gap: .65rem; }

/* ===== service cards without a photo: a designed tile from the kind of service ===== */
.tg-ph-art { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(120% 120% at 85% 0%, var(--deep-2), var(--deep) 70%); }
.tg-ph-art.is-meal { background: radial-gradient(120% 120% at 85% 0%, #1B6A62, #0B3A46 70%); }
.tg-ph-art.is-print { background: radial-gradient(120% 120% at 85% 0%, #24505F, #102F3A 70%); }
.tg-ph-art::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 28px 28px; }
.tg-ph-art .wm { position: absolute; inset-inline-start: -10px; bottom: -40px; font-size: 170px; line-height: 1; color: #fff; opacity: .06; }
.tg-ph-art .ic { position: relative; z-index: 1; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 22px; background: var(--accent); color: #fff; font-size: 34px; box-shadow: 0 16px 34px rgba(0, 0, 0, .25); transition: transform var(--ease); }
.tg-card:hover .tg-ph-art .ic { transform: rotate(-6deg) scale(1.05); }

/* ===== subscription plans (PageLab pricing): billing switch + plan cards, the current plan in deep petrol ===== */
.tg-plans-wrap { position: relative; margin-top: clamp(16px, 1.6vw, 22px); }
.tg-bill-in { position: absolute; opacity: 0; pointer-events: none; }
.tg-plans-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tg-bill { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tg-bill label { display: inline-flex; align-items: center; gap: .4rem; min-height: 42px; padding: 0 1rem; border-radius: 10px; color: var(--muted); font-weight: 700; cursor: pointer; }
.tg-bill-save { padding: 0 .5rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 15px; }
#billM:checked ~ .tg-plans-head label[for="billM"], #billY:checked ~ .tg-plans-head label[for="billY"] { background: var(--surface); color: var(--brand-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
#billM:focus-visible ~ .tg-plans-head label[for="billM"], #billY:focus-visible ~ .tg-plans-head label[for="billY"] { outline: 3px solid rgba(var(--brand-rgb), .4); }
#billM:checked ~ .tg-plans .is-y, #billY:checked ~ .tg-plans .is-m { display: none; }
.tg-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; align-items: stretch; }
.tg-plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tg-plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--brand-rgb), .35); }
.tg-plan-top { display: flex; align-items: center; gap: 12px; }
.tg-plan-ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: linear-gradient(135deg, var(--brand), var(--deep)); color: #fff; font-size: 22px; }
.tg-plan h3 { margin: 0; font-size: 22px; }
.tg-plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tg-plan-price b { font-size: 46px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.tg-plan-price > span { color: var(--muted); font-weight: 600; }
.tg-plan-price em { flex-basis: 100%; font-style: normal; color: var(--ok); font-weight: 700; font-size: 15px; }
.tg-plan-feats { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: .55rem; flex: 1; }
.tg-plan-feats li { display: flex; gap: .6rem; align-items: flex-start; }
.tg-plan-feats li::before { content: "\F26E"; font-family: "bootstrap-icons"; flex: 0 0 auto; display: grid; place-items: center; width: 24px; height: 24px; margin-top: .2rem; border-radius: 50%; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); font-size: .95rem; }
.tg-plan-acts form { margin: 0; }
.tg-plan-acts .btx-block { width: 100%; }
.tg-plan.is-current { color: #fff; border-color: transparent; background: radial-gradient(120% 90% at 100% 0%, var(--deep-2), var(--deep) 62%); box-shadow: 0 24px 50px rgba(11, 58, 70, .28); }
.tg-plan.is-current h3, .tg-plan.is-current .tg-plan-price b { color: #fff; }
.tg-plan.is-current .tg-plan-price > span { color: #A9C3C8; }
.tg-plan.is-current .tg-plan-price em { color: #8EE0AE; }
.tg-plan.is-current .tg-plan-ic { background: var(--accent); }
.tg-plan.is-current .tg-plan-feats { border-top-color: rgba(255, 255, 255, .18); }
.tg-plan.is-current .tg-plan-feats li::before { background: rgba(255, 255, 255, .14); color: #fff; }
.tg-plan-ribbon { position: absolute; top: 18px; inset-inline-end: 18px; display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 15px; font-weight: 800; }

/* ===== account dashboard: task tiles (DashLab "today" tiles), presence cards, KPI tiles ===== */
.tg-tasks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; }
.tg-task { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ic . go" "tx tx tx"; row-gap: 12px; align-items: center; padding: 16px; border-radius: 20px;
  background: linear-gradient(160deg, var(--surface) 55%, var(--surface-2)); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tg-task .ico { grid-area: ic; width: 48px; height: 48px; border-radius: 15px; font-size: 1.3rem; }
.tg-task > i { grid-area: go; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); transition: background var(--ease), color var(--ease); }
.tg-task .tx { grid-area: tx; }
.tg-task .tx > b { font-size: 30px; line-height: 1.15; }
.tg-task:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tg-task:hover > i { background: var(--brand); color: #fff; }
.tg-task.is-on { border-color: rgba(var(--brand-rgb), .3); background: radial-gradient(120% 100% at 100% 0%, rgba(var(--brand-rgb), .12), transparent 60%), var(--surface); }
.tg-task.is-on .ico { background: linear-gradient(135deg, var(--brand), var(--deep)); color: #fff; box-shadow: 0 10px 20px rgba(var(--brand-rgb), .25); }
.tg-task.is-on .tx > b { color: var(--brand-ink); }
.tg-task.is-late { border-color: rgba(220, 38, 38, .3); background: radial-gradient(120% 100% at 100% 0%, rgba(220, 38, 38, .1), transparent 60%), var(--surface); }
.tg-task.is-late .ico { background: var(--danger); color: #fff; box-shadow: none; }
.tg-task.is-late .tx > b { color: var(--danger); }
[data-bs-theme="dark"] .tg-task { background: linear-gradient(160deg, var(--surface) 55%, rgba(var(--brand-rgb), .1)); }

.th-presence { position: relative; overflow: hidden; isolation: isolate; min-height: 92px; padding: 16px 18px; border-radius: 20px; background: radial-gradient(110% 100% at 100% 0%, rgba(var(--brand-rgb), .1), transparent 60%), var(--surface); }
.th-presence .th-party-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: 0 0 auto; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--deep)); }
.th-presence strong { font-size: 18px; }
.th-presence:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.grid-2 > .th-presence + .th-presence { margin-top: 0; }

.th-stats-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.th-stats-grid > div { position: relative; overflow: hidden; gap: .2rem; padding: 16px 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.th-stats-grid > div::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--deep)); opacity: .8; }
.th-stats-grid > div:nth-child(4n+2)::after { background: linear-gradient(90deg, var(--accent), var(--cta)); }
.th-stats-grid > div > span { font-size: 15px; font-weight: 600; }
.th-stats-grid > div > strong { font-size: 30px; line-height: 1.2; color: var(--ink); }

/* ===== account: "complete your account" (progress ring + checklist) ===== */
.tg-complete { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); align-items: center; border-color: rgba(242, 107, 74, .35);
  background: radial-gradient(90% 120% at 100% 0%, rgba(242, 107, 74, .08), transparent 60%), var(--surface); }
.tg-complete-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.tg-complete-ring b { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--surface); font-size: 28px; font-weight: 800; }
.tg-complete-b h2 { margin: 0 0 .2rem; font-size: 22px; }
.tg-complete-list { list-style: none; margin: .8rem 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.tg-complete-list li { display: flex; align-items: center; gap: .5rem; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-weight: 600; }
.tg-complete-list li > i { color: var(--muted); }
.tg-complete-list li.is-done { color: var(--muted); }
.tg-complete-list li.is-done > i { color: var(--ok); }
@media (max-width: 575.98px) { .tg-complete { grid-template-columns: minmax(0, 1fr); justify-items: start; } }

/* ===== sign-up wizard: one question per screen ===== */
.wz-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wz-type { color: var(--muted); font-weight: 700; }
.wz-bar { height: 6px; margin: 14px 0 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wz-bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .35s ease; }
[dir="rtl"] .wz-bar > i { margin-inline-start: 0; }
.tg-wz .wz-step { padding-top: 18px; }
.tg-wz .wz-step + .wz-step { margin-top: 28px; padding-top: 28px; border-top: 1px dashed var(--line); }
.tg-wz.wz-on .wz-step { display: none; margin: 0; border: 0; }
.tg-wz.wz-on .wz-step.is-cur { display: block; }
.tg-wz.wz-on .wz-step.is-cur.wz-anim { animation: wzIn .3s ease; }
@keyframes wzIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tg-wz.wz-on .wz-step.is-cur { animation: none; } .wz-bar > i { transition: none; } }
.wz-count { display: inline-block; padding: .1rem .75rem; border-radius: 999px; background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); font-size: 15px; font-weight: 800; }
.tg-wz h1 { margin: .6rem 0 .2rem; font-size: clamp(26px, 3vw, 36px); outline: none; }
.tg-wz .sub { margin-bottom: 1.2rem; }
.wz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.wz-card { position: relative; cursor: pointer; }
.wz-card > input { position: absolute; opacity: 0; inset: 0; }
.wz-card-in { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; min-height: 112px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color var(--ease), background var(--ease), transform var(--ease), box-shadow var(--ease); }
.wz-card-in .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(var(--brand-rgb), .1); color: var(--brand); font-size: 20px; transition: background var(--ease), color var(--ease); }
.wz-card-in b { font-size: 16px; line-height: 1.5; }
.wz-card-in .tick { position: absolute; top: 12px; inset-inline-end: 12px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); color: transparent; font-size: 15px; }
.wz-card:hover .wz-card-in { border-color: rgba(var(--brand-rgb), .45); transform: translateY(-2px); }
.wz-card > input:checked + .wz-card-in { border-color: transparent; background: linear-gradient(160deg, var(--deep-2), var(--deep)); color: #fff; box-shadow: 0 12px 26px rgba(11, 58, 70, .22); }
.wz-card > input:checked + .wz-card-in .ic { background: var(--accent); color: #fff; }
.wz-card > input:checked + .wz-card-in .tick { border-color: transparent; background: #fff; color: var(--deep); }
.wz-card > input:focus-visible + .wz-card-in { outline: 3px solid rgba(var(--brand-rgb), .45); outline-offset: 2px; }
.wz-cards.is-invalid .wz-card-in { border-color: rgba(220, 38, 38, .45); }
.wz-picked { min-height: 1.6em; margin: .7rem 0 0; color: var(--brand-ink); font-weight: 800; }
.wz-big .fm-input { min-height: 64px; font-size: 22px; font-weight: 700; border-radius: 18px; }
.wz-fields { display: grid; gap: 14px; }
.wz-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.tg-next { margin: 0 0 1.2rem; padding: 0; list-style: none; counter-reset: nx; display: grid; gap: 8px; text-align: start; }
.tg-next li { counter-increment: nx; display: flex; gap: .7rem; align-items: flex-start; }
.tg-next li::before { content: counter(nx); flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); font-weight: 800; font-size: 15px; }
/* wizard on phones: two compact cards per row; Back / Next stay at the bottom of the screen */
@media (max-width: 575.98px) {
  .wz-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wz-card-in { min-height: 96px; padding: 12px; gap: 8px; border-radius: 16px; }
  .wz-card-in .ic { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
  .wz-card-in b { font-size: 15px; }
  .wz-card-in .tick { width: 22px; height: 22px; top: 10px; inset-inline-end: 10px; }
  .tg-wz.wz-on .wz-nav { position: sticky; bottom: 0; z-index: 5; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--page); box-shadow: 0 -8px 20px rgba(11, 58, 70, .08); }
  .tg-wz.wz-on .wz-nav .btx { flex: 1; justify-content: center; }
}
/* a left-to-right password field inside an Arabic page: the eye button follows the page (left),
   so the field keeps its free space on the left too (its own "start"), not on its "end" */
[dir="rtl"] .pw .fm-input[dir="ltr"] { padding-inline-start: 52px; padding-inline-end: 14px; }

/* ===== step-by-step forms everywhere (wz_begin / wz_step / wz_end) ===== */
.wz-q { margin: .55rem 0 .2rem; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; outline: none; }
.wz-hint { margin: 0 0 1.2rem; color: var(--muted); }
form[data-wizard] .wz-bar { margin-top: 0; }
.wz-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 0; }
.wz-chips[hidden] { display: none; }
.wz-chips button { min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 15px var(--font); cursor: pointer; }
.wz-chips button[aria-current="step"] { background: var(--deep); border-color: var(--deep); color: #fff; }
form[data-wizard]:not(.wz-on) .wz-step + .wz-step { margin-top: 28px; padding-top: 28px; border-top: 1px dashed var(--line); }
form[data-wizard].wz-on .wz-step { display: none; }
form[data-wizard].wz-on .wz-step.is-cur { display: block; }
form[data-wizard].wz-on .wz-step.is-cur.wz-anim { animation: wzIn .3s ease; }
form[data-wizard]:not(.wz-on) .wz-review .wz-summary, form[data-wizard]:not(.wz-on) .wz-review > .wz-hint, form[data-wizard]:not(.wz-on) .wz-review > .wz-q, form[data-wizard]:not(.wz-on) [data-wz-next], form[data-wizard]:not(.wz-on) [data-wz-back] { display: none; }
.wz-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-summary { display: grid; gap: 12px; }
.wz-sum { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface-2); }
.wz-sum-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: .4rem; }
.wz-sum-h b { font-size: 17px; }
.wz-sum dl { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
.wz-sum dt { color: var(--muted); font-weight: 600; }
.wz-sum dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .wz-sum dl { grid-template-columns: minmax(0, 1fr); }
  .wz-sum dd { margin-bottom: .4rem; }
  form[data-wizard].wz-on .wz-nav { position: sticky; bottom: 0; z-index: 5; margin-inline: -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -8px 20px rgba(11, 58, 70, .08); }
  form[data-wizard].wz-on .wz-nav > .btx, form[data-wizard].wz-on .wz-acts { flex: 1; }
  form[data-wizard].wz-on .wz-acts .btx { flex: 1; justify-content: center; }
}

/* ===== proposals side by side (DashLab compare): one card per proposal, rows aligned across cards ===== */
.tg-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 14px; align-items: stretch; }
.tg-cmp-card { position: relative; display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; min-width: 0; border-radius: 22px; border: 1.5px solid var(--line); background: var(--surface); overflow: hidden; transition: box-shadow var(--ease), border-color var(--ease); }
.tg-cmp-card > * { padding-inline: 18px; min-width: 0; }
.tg-cmp-card:hover { box-shadow: var(--shadow); }
.tg-cmp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; padding-bottom: 12px; }
.tg-cmp-av { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--deep)); color: #fff; font-size: 20px; font-weight: 800; }
.tg-cmp-name { flex: 1 1 140px; min-width: 0; color: var(--ink); font-size: 18px; font-weight: 800; line-height: 1.45; text-decoration: none; }
.tg-cmp-name:hover { color: var(--brand); }
.tg-cmp-flag { flex-basis: 100%; display: inline-flex; align-items: center; gap: .35rem; justify-self: start; width: max-content; padding: .1rem .75rem; border-radius: 999px; font-size: 15px; font-weight: 800; }
.tg-cmp-flag.best { background: var(--ok-bg); color: var(--ok); }
.tg-cmp-flag.won { background: rgba(242, 107, 74, .14); color: var(--cta); }
.tg-cmp-price { display: grid; align-content: start; gap: 2px; padding-top: 14px; padding-bottom: 14px; background: var(--surface-2); border-block: 1px solid var(--line); }
.tg-cmp-price .lbl, .tg-cmp-price .sub { color: var(--muted); font-size: 15px; font-weight: 600; }
.tg-cmp-price b { font-size: 30px; font-weight: 800; line-height: 1.25; color: var(--ink); }
.tg-cmp-price .more { justify-self: start; margin-top: 4px; padding: 0 .6rem; border-radius: 999px; background: rgba(242, 107, 74, .1); color: var(--cta); font-size: 15px; font-weight: 700; }
.tg-cmp-price .closed { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 700; }
.tg-cmp-rows { margin: 0; padding-top: 10px; padding-bottom: 6px; }
.tg-cmp-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.tg-cmp-rows > div:last-child { border-bottom: 0; }
.tg-cmp-rows dt { color: var(--muted); font-weight: 600; flex: 0 0 auto; }
.tg-cmp-rows dd { margin: 0; text-align: end; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.tg-cmp-files { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; padding-bottom: 8px; font-size: 15px; }
.tg-cmp-more { padding-bottom: 10px; }
.tg-cmp-more > summary { cursor: pointer; color: var(--brand); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.tg-cmp-foot { padding-top: 6px; padding-bottom: 16px; align-self: end; }
.tg-cmp-foot .btx-block { width: 100%; justify-content: center; }
.tg-cmp-done { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-weight: 800; }
.tg-cmp-card.is-best { border-color: rgba(21, 128, 61, .45); box-shadow: 0 14px 30px rgba(21, 128, 61, .1); }
.tg-cmp-card.is-won { border-color: var(--accent); box-shadow: 0 16px 34px rgba(242, 107, 74, .16); }
.tg-cmp-card.is-won .tg-cmp-price { background: rgba(242, 107, 74, .07); }
.tg-cmp-card.is-out { opacity: .72; }
.tg-cmp-card.is-out .tg-cmp-price { background: transparent; }
