/**
 * Shared CSS for all country-comparison tool pages.
 * 4 category themes match the journey sections on /tools hub.
 *
 * Variables per theme:
 *   --t-accent   Primary accent
 *   --t-dark     Darkest shade (h1, h2)
 *   --t-mid      Medium shade (subtitle)
 *   --t-light    Light (borders)
 *   --t-pale     Palest (spinner ring)
 *   --t-bg1      BG gradient start / active bg
 *   --t-bg2      BG gradient middle
 *   --t-search   Search icon color
 *   --t-rgb      RGB triplet for rgba()
 *   --t-check    Check/boolean icon color
 */

/* ============================================================
   THEME DEFINITIONS (4 journey-section themes)
   ============================================================ */

.t-theme[data-category="discover"] { /* Orange */
  --t-accent:#ea580c; --t-dark:#9a3412; --t-mid:#c2410c;
  --t-light:#fed7aa; --t-pale:#ffedd5;
  --t-bg1:#fff7ed; --t-bg2:#ffedd5;
  --t-search:#fb923c; --t-rgb:234,88,12; --t-check:#ea580c;
}
.t-theme[data-category="plan"] { /* Blue */
  --t-accent:#2563eb; --t-dark:#1e3a8a; --t-mid:#1d4ed8;
  --t-light:#bfdbfe; --t-pale:#dbeafe;
  --t-bg1:#eff6ff; --t-bg2:#dbeafe;
  --t-search:#60a5fa; --t-rgb:37,99,235; --t-check:#2563eb;
}
.t-theme[data-category="settle"] { /* Teal/Cyan */
  --t-accent:#0891b2; --t-dark:#164e63; --t-mid:#0e7490;
  --t-light:#a5f3fc; --t-pale:#cffafe;
  --t-bg1:#ecfeff; --t-bg2:#cffafe;
  --t-search:#67e8f9; --t-rgb:8,145,178; --t-check:#0891b2;
}
.t-theme[data-category="protect"] { /* Purple */
  --t-accent:#7c3aed; --t-dark:#3b0764; --t-mid:#6d28d9;
  --t-light:#ddd6fe; --t-pale:#ede9fe;
  --t-bg1:#f5f3ff; --t-bg2:#ede9fe;
  --t-search:#a78bfa; --t-rgb:124,58,237; --t-check:#7c3aed;
}

/* ============================================================
   BASE LAYOUT
   ============================================================ */

.t-page { background: #f8fafb; }
.t-container { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   LOADING
   ============================================================ */

.t-loading {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 4rem 1rem; color: #64748b;
  opacity: 0; animation: tLoadShow 0.3s ease 0.4s forwards;
}
.t-loading p { font-size: 1.125rem; margin: 0; }
.t-spinner {
  width: 2rem; height: 2rem;
  border: 3px solid var(--t-pale); border-top-color: var(--t-accent);
  border-radius: 50%; animation: tSpin 0.8s linear infinite;
}

/* ============================================================
   HERO
   ============================================================ */

.t-hero {
  background: linear-gradient(135deg, var(--t-bg1) 0%, var(--t-bg2) 50%, #f8fafc 100%);
  border-bottom: 2px solid var(--t-light);
  padding: 2rem 0 1.5rem;
}
.t-hero h1 {
  font-size: 2rem; font-weight: 800; color: var(--t-dark);
  margin: 0 0 0.375rem; letter-spacing: -0.025em;
}
.t-subtitle { font-size: 1.125rem; color: var(--t-mid); margin: 0 0 1.25rem; opacity: 0.85; }

/* ============================================================
   SEARCH
   ============================================================ */

.t-search-wrap { position: relative; max-width: 24rem; }
.t-search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 1.125rem; height: 1.125rem; color: var(--t-search); pointer-events: none;
}
.t-search-input {
  width: 100%; height: 2.75rem; padding: 0 1rem 0 2.5rem;
  background: white; border: 2px solid var(--t-light); border-radius: 0.75rem;
  font-size: 1rem; color: #0f172a; box-sizing: border-box; transition: all 0.2s;
}
.t-search-input:focus {
  outline: none; border-color: var(--t-accent);
  box-shadow: 0 0 0 3px rgba(var(--t-rgb), 0.15);
}
.t-search-input::placeholder { color: #64748b; }
.t-result-count { font-size: 0.9375rem; color: #64748b; margin-top: 0.625rem; }

/* ============================================================
   GRID
   ============================================================ */

.t-grid-section { padding: 1.5rem 0 0; }
.t-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--t-grid-min, 17rem), 1fr));
  gap: 0.625rem;
}
.t-no-results { text-align: center; color: #64748b; padding: 2rem 0; font-size: 1.125rem; }

/* ============================================================
   CARDS
   ============================================================ */

.t-card {
  display: flex; align-items: center; gap: 0.625rem;
  padding: var(--t-card-pad, 0.625rem 0.875rem);
  background: white; border: 2px solid #e2e8f0; border-radius: 0.75rem;
  cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: all 0.2s ease; animation: tFadeIn 0.35s ease both;
}
.t-card:hover {
  border-color: var(--t-light);
  box-shadow: 0 2px 8px rgba(var(--t-rgb), 0.1);
  transform: translateY(-1px);
}
.t-card-active {
  border-color: var(--t-accent); background: var(--t-bg1);
  box-shadow: 0 0 0 3px rgba(var(--t-rgb), 0.15);
}
.t-card-flag { border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.t-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.t-card-name {
  font-size: 1.0625rem; font-weight: 700; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Card sub-text variants (all tools use one of these for secondary info) */
.t-card-cost,
.t-card-meta,
.t-card-stat,
.t-card-sub {
  font-size: 1rem; color: #64748b; font-variant-numeric: tabular-nums;
}
.t-card-cost small,
.t-card-meta small,
.t-card-stat small,
.t-card-sub small {
  font-size: 0.875rem; color: #64748b; margin-left: 1px;
}
/* Extra card lines (some tools show additional info like visa name) */
.t-card-visa {
  font-size: 0.875rem; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   BADGES
   ============================================================ */

.t-badge {
  display: inline-flex; align-items: center;
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.t-badge-great { color: #065f46; background: #d1fae5; }
.t-badge-good  { color: #1e40af; background: #dbeafe; }
.t-badge-mid   { color: #92400e; background: #fef3c7; }
.t-badge-high  { color: #991b1b; background: #fee2e2; }

/* ============================================================
   DETAIL PANEL
   ============================================================ */

.t-detail-section { padding: 1rem 0 0; animation: tSlideDown 0.3s ease; }

.t-detail-card {
  background: white; border: 2px solid var(--t-light);
  border-radius: 1rem; padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(var(--t-rgb), 0.08);
}

.t-detail-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.25rem; position: relative;
}
.t-detail-header img { border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.t-detail-header h2 { font-size: 1.5rem; font-weight: 800; color: var(--t-dark); margin: 0; }
.t-detail-header .t-badge { margin-top: 0.25rem; }
.t-detail-close {
  position: absolute; top: -0.25rem; right: 0;
  background: none; border: none; font-size: 1.5rem;
  color: #64748b; cursor: pointer; line-height: 1; padding: 0.25rem;
}
.t-detail-close:hover { color: #334155; }

.t-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.t-detail-block {
  padding: 1rem; background: #f8fafb;
  border: 1.5px solid #e2e8f0; border-radius: 0.75rem;
}
.t-detail-block h3 {
  font-size: 1rem; font-weight: 700; color: var(--t-accent);
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.75rem;
}

/* ============================================================
   SCORE BARS
   ============================================================ */

.t-score-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.t-score-label {
  font-size: 0.9375rem; font-weight: 600; color: #334155;
  min-width: var(--t-score-min, 6.5rem);
}
.t-score-track { flex: 1; height: 1rem; background: #e2e8f0; border-radius: 0.375rem; overflow: hidden; }
.t-score-fill { height: 100%; border-radius: 0.375rem; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.t-score-val {
  font-size: 1rem; font-weight: 800; color: #334155;
  min-width: 1.75rem; text-align: right; font-variant-numeric: tabular-nums;
}

/* ============================================================
   COST BARS
   ============================================================ */

.t-cost-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.t-cost-label { font-size: 0.9375rem; font-weight: 600; color: #334155; min-width: 5.5rem; }
.t-cost-track { flex: 1; height: 1rem; background: #e2e8f0; border-radius: 0.375rem; overflow: hidden; }
.t-cost-fill { height: 100%; border-radius: 0.375rem; transition: width 0.5s cubic-bezier(0.4,0,0.2,1); }
.t-cost-val {
  font-size: 0.9375rem; font-weight: 700; color: #334155;
  white-space: nowrap; font-variant-numeric: tabular-nums;
  min-width: var(--t-cost-min, 6rem); text-align: right;
}
.t-inline-fact { font-size: 0.9375rem; color: #64748b; margin-top: 0.375rem; }
.t-inline-fact strong { color: #334155; }

/* ============================================================
   BOOLEAN GRIDS (coverage, fintech, quick-facts variants)
   ============================================================ */

.t-coverage-grid,
.t-bool-grid,
.t-quick-grid,
.t-cov-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.375rem; margin-bottom: 0.625rem;
}

.t-cov-item,
.t-bool-item,
.t-quick-item {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.9375rem; color: #334155;
}

/* Vertical bool list variant */
.t-bool-list { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 0.625rem; }

/* ============================================================
   CHECK / CROSS ICONS
   ============================================================ */

.t-check { width: 1.125rem; height: 1.125rem; color: var(--t-check); flex-shrink: 0; }
.t-cross { width: 1.125rem; height: 1.125rem; color: #cbd5e1; flex-shrink: 0; }

/* ============================================================
   FACTS
   ============================================================ */

.t-fact {
  display: flex; gap: 0.375rem; font-size: 0.9375rem;
  margin-bottom: 0.375rem; flex-wrap: wrap;
}
.t-fact-label { font-weight: 600; color: #64748b; white-space: nowrap; }
.t-fact-label::after { content: ':'; }
.t-fact-value { color: #334155; }

/* ============================================================
   NOTES (public-option, detail-note, pitfalls variants)
   ============================================================ */

.t-public-note,
.t-detail-note {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.5rem 0.75rem; background: var(--t-bg1);
  border-radius: 0.5rem; margin-top: 0.5rem;
}
.t-public-note svg,
.t-detail-note svg {
  flex-shrink: 0; color: var(--t-accent); margin-top: 0.0625rem;
}
.t-public-note span,
.t-detail-note span {
  font-size: 0.9375rem; color: var(--t-dark); line-height: 1.4;
}

/* ============================================================
   TIPS BLOCK
   ============================================================ */

.t-tips-block {
  display: flex; align-items: flex-start; gap: 0.625rem;
  padding: 1rem; margin-top: 1.25rem;
  background: var(--t-bg1); border: 1.5px solid var(--t-light);
  border-radius: 0.75rem;
}
.t-tips-block svg { flex-shrink: 0; color: var(--t-accent); margin-top: 0.125rem; }
.t-tips-block strong {
  font-size: 0.9375rem; color: var(--t-dark);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.t-tips-block p {
  font-size: 1.0625rem; color: var(--t-mid);
  line-height: 1.5; margin: 0.25rem 0 0;
}

/* ============================================================
   DISCLAIMER (identical across all tools)
   ============================================================ */

.t-disclaimer-section { padding: 1.5rem 0 3rem; }
.t-disclaimer {
  display: flex; gap: 0.75rem; padding: 1rem;
  background: #fffbeb; border-radius: 0.75rem; border: 1.5px solid #fde68a;
}
.t-disclaimer svg {
  width: 1.25rem; height: 1.25rem; color: #d97706;
  flex-shrink: 0; margin-top: 0.125rem;
}
.t-disclaimer p { font-size: 1.0625rem; color: #92400e; margin: 0; line-height: 1.5; }
.t-disclaimer strong { color: #78350f; }
.t-disclaimer a { color: #d97706; text-decoration: none; font-weight: 500; }
.t-disclaimer a:hover { text-decoration: underline; }

/* ============================================================
   BACK LINK
   ============================================================ */

.t-back-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.9375rem; font-weight: 600; color: #64748b;
  text-decoration: none; margin-bottom: 0.75rem; transition: color 0.15s;
}
.t-back-link:hover { color: #0f172a; }

/* Bottom back link (inside detail card) */
.t-back-link-bottom {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.9375rem; font-weight: 600; color: #64748b;
  text-decoration: none; margin-top: 1.25rem; transition: color 0.15s;
}
.t-back-link-bottom:hover { color: #0f172a; }

/* When detail is active, hide the grid and search controls */
#t-app.t-detail-active .t-grid-section { display: none; }
#t-app.t-detail-active .t-hero .t-search-wrap { display: none; }
#t-app.t-detail-active .t-hero .t-result-count { display: none; }
#t-app.t-detail-active .t-hero [slot="filters"] { display: none; }

/* ============================================================
   BADGES ROW / HEADER BADGES
   ============================================================ */

.t-badges-row,
.t-header-badges,
.t-badge-row { display: flex; gap: 0.375rem; margin-top: 0.25rem; flex-wrap: wrap; }
.t-badge-score {
  display: inline-flex; align-items: center; padding: 0.125rem 0.5rem;
  border-radius: 9999px; font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.02em; white-space: nowrap; color: var(--t-dark); background: var(--t-bg1);
}

/* ============================================================
   FULL-WIDTH BLOCK / BLOCK TEXT / HEADLINE
   ============================================================ */

.t-full-block { margin-top: 1.25rem; }
.t-detail-block-wide { grid-column: 1 / -1; }
.t-block-text { font-size: 1.0625rem; color: #334155; line-height: 1.55; margin: 0; }
.t-headline {
  font-size: 1rem; color: #475569; line-height: 1.5; margin: 0 0 1.25rem;
  padding: 0.625rem 0.875rem; background: var(--t-bg1); border-radius: 0.5rem;
  border-left: 3px solid var(--t-accent);
}

/* ============================================================
   BIG NUMBER (remote-work-tax)
   ============================================================ */

.t-big-number { font-size: 2.25rem; font-weight: 800; color: var(--t-accent); line-height: 1; margin-bottom: 0.375rem; }
.t-big-unit { display: block; font-size: 0.875rem; font-weight: 600; color: var(--t-mid); margin-top: 0.125rem; }

/* ============================================================
   TAX EXAMPLE GRID (remote-work-tax)
   ============================================================ */

.t-tax-example-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.t-tax-example-col {
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem; background: var(--t-bg1); border: 1.5px solid var(--t-light);
  border-radius: 0.75rem; text-align: center;
}
.t-tax-example-label { font-size: 0.9375rem; font-weight: 600; color: var(--t-dark); margin-bottom: 0.375rem; }
.t-tax-example-value { font-size: 1.75rem; font-weight: 800; color: var(--t-accent); line-height: 1; }
.t-tax-example-sub { font-size: 0.875rem; color: var(--t-mid); margin-top: 0.25rem; }

/* ============================================================
   TAGS (tax-relocation)
   ============================================================ */

.t-tags-row { display: flex; gap: 0.25rem; margin-top: 0.375rem; flex-wrap: wrap; }
.t-tag {
  display: inline-flex; padding: 0.0625rem 0.375rem; border-radius: 0.25rem;
  font-size: 0.8125rem; color: var(--t-dark); background: var(--t-bg1);
}
.t-scores-block { margin-top: 0; margin-bottom: 0.25rem; }

/* ============================================================
   FATAL BLOCK (tax-relocation)
   ============================================================ */

.t-fatal-block { background: #fef2f2; border-color: #fecaca; }
.t-fatal-block svg { color: #dc2626; }
.t-fatal-block strong { color: #991b1b; }
.t-fatal-block p { color: #7f1d1d; }

/* ============================================================
   WARNING BLOCK (shared: remote-work-tax, tax-relocation, etc.)
   ============================================================ */

.t-warning-block {
  display: flex; align-items: flex-start; gap: 0.625rem; padding: 1rem;
  margin-top: 1.25rem; background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 0.75rem;
}
.t-warning-block svg { flex-shrink: 0; color: #d97706; margin-top: 0.125rem; }
.t-warning-block strong { font-size: 0.9375rem; color: #92400e; text-transform: uppercase; letter-spacing: 0.03em; }
.t-warning-block p { font-size: 1.0625rem; color: #78350f; line-height: 1.5; margin: 0.25rem 0 0; }

/* ============================================================
   CHECKLIST (shared: 7 tools with phase/step checklists)
   ============================================================ */

.t-checklist-section {
  margin-top: 1.25rem; padding: 1rem; background: #f8fafb;
  border: 1.5px solid #e2e8f0; border-radius: 0.75rem;
}
.t-checklist-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem;
}
.t-checklist-header h3 {
  font-size: 1rem; font-weight: 700; color: var(--t-accent);
  text-transform: uppercase; letter-spacing: 0.05em; margin: 0;
}

/* Progress bar */
.t-progress-wrap { display: flex; align-items: center; gap: 0.5rem; }
.t-progress-bar { width: 8rem; height: 0.5rem; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.t-progress-fill { height: 100%; background: var(--t-accent); border-radius: 9999px; transition: width 0.3s ease; }
.t-progress-text { font-size: 0.875rem; font-weight: 700; color: var(--t-accent); white-space: nowrap; }

/* Phase accordion */
.t-phase { margin-bottom: 0.5rem; }
.t-phase-header {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  padding: 0.5rem 0.625rem; background: white; border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem; cursor: pointer; font: inherit; color: inherit;
  text-align: left; transition: all 0.2s;
}
.t-phase-header:hover { border-color: var(--t-light); }
.t-phase-chevron { width: 1.125rem; height: 1.125rem; color: #64748b; flex-shrink: 0; transition: transform 0.2s; }
.t-phase-expanded .t-phase-chevron { transform: rotate(180deg); }
.t-phase-title { flex: 1; font-size: 1rem; font-weight: 700; color: #334155; }
.t-phase-count {
  font-size: 0.875rem; font-weight: 700; color: var(--t-accent);
  background: var(--t-bg1); padding: 0.125rem 0.5rem; border-radius: 9999px;
}
.t-phase-items { display: none; padding: 0.5rem 0 0 1.25rem; }
.t-phase-items.t-phase-open { display: block; }

/* Step items */
.t-step-item {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.5rem 0.625rem; margin-bottom: 0.25rem;
  border-radius: 0.5rem; cursor: pointer; transition: background 0.15s;
}
.t-step-item:hover { background: white; }
.t-step-done { opacity: 0.6; }
.t-step-done .t-step-title { text-decoration: line-through; }
.t-step-critical { }
.t-step-check {
  width: 1.125rem; height: 1.125rem; margin-top: 0.125rem;
  flex-shrink: 0; accent-color: var(--t-accent); cursor: pointer;
}
.t-step-content { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.t-step-title { font-size: 1rem; font-weight: 600; color: #1e293b; }
.t-step-desc { font-size: 0.9375rem; color: #64748b; line-height: 1.4; }
.t-step-timeline { font-size: 0.875rem; font-weight: 600; color: var(--t-accent); }
.t-critical-tag {
  display: inline-flex; margin-left: 0.375rem; padding: 0.0625rem 0.375rem;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 700;
  color: #991b1b; background: #fee2e2; text-transform: uppercase;
  letter-spacing: 0.03em; vertical-align: middle;
}

/* ============================================================
   SALARY CALCULATOR (stats, brackets, calc grid)
   ============================================================ */

.t-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.t-stat { display: flex; flex-direction: column; gap: 0.125rem; }
.t-stat-label { font-size: 0.875rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; }
.t-stat-value { font-size: 1rem; font-weight: 800; color: #1e293b; font-variant-numeric: tabular-nums; }
.t-brackets-text { font-size: 1rem; color: #334155; line-height: 1.65; white-space: pre-line; font-variant-numeric: tabular-nums; }
.t-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.t-calc-col { padding: 0.875rem; background: white; border: 1.5px solid #e2e8f0; border-radius: 0.625rem; }
.t-calc-header {
  font-size: 1rem; font-weight: 700; color: var(--t-accent);
  margin-bottom: 0.625rem; text-align: center; text-transform: uppercase; letter-spacing: 0.03em;
}
.t-calc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.3125rem 0; border-bottom: 1px solid #f1f5f9;
}
.t-calc-row:last-child { border-bottom: none; }
.t-calc-label { font-size: 0.9375rem; font-weight: 600; color: #64748b; }
.t-calc-value { font-size: 1rem; font-weight: 700; color: #1e293b; font-variant-numeric: tabular-nums; }
.t-calc-highlight { color: var(--t-dark); font-size: 1rem; font-weight: 800; }
.t-expat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; margin-bottom: 0.625rem; }
.t-expat-item { display: flex; align-items: center; gap: 0.375rem; font-size: 0.9375rem; color: #334155; }
.t-expat-item strong { color: #1e293b; }
.t-treaty-icon { width: 1.125rem; height: 1.125rem; color: var(--t-accent); flex-shrink: 0; }

/* ============================================================
   SIM & eSIM (badges, bars, difficulty)
   ============================================================ */

.t-card-badges { display: flex; flex-direction: column; gap: 0.25rem; align-items: flex-end; flex-shrink: 0; }
.t-card-carrier {
  font-size: 0.875rem; color: #64748b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-detail-badges { display: flex; gap: 0.375rem; margin-top: 0.25rem; flex-wrap: wrap; }
.t-badge-esim {
  display: inline-flex; align-items: center; padding: 0.125rem 0.5rem;
  border-radius: 9999px; font-size: 0.875rem; font-weight: 700;
  letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap;
}
.t-esim-yes { color: #065f46; background: #d1fae5; }
.t-esim-no { color: #64748b; background: #f1f5f9; }
.t-block-icon { width: 1rem; height: 1rem; color: var(--t-accent); flex-shrink: 0; }
.t-tips-text { font-size: 1rem; color: #334155; line-height: 1.6; margin: 0; }
.t-fact-highlight { color: var(--t-accent); font-weight: 700; font-size: 1.0625rem; }

/* Signal/coverage bars */
.t-bar-wrap { margin-bottom: 0.75rem; }
.t-bar-label { font-size: 0.9375rem; font-weight: 600; color: #334155; margin-bottom: 0.25rem; }
.t-bar-track { height: 0.625rem; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.t-bar-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; }
.t-bar-4g { background: var(--t-accent); }
.t-bar-pct {
  font-size: 0.875rem; font-weight: 700; color: #334155;
  margin-top: 0.125rem; font-variant-numeric: tabular-nums;
}

/* Difficulty colors */
.t-diff-easy { color: #065f46; font-weight: 600; }
.t-diff-moderate { color: #92400e; font-weight: 600; }
.t-diff-difficult { color: #991b1b; font-weight: 600; }

/* ============================================================
   DRIVING ABROAD (side badge, single-col bool grid)
   ============================================================ */

.t-driving-side {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.75rem; font-size: 1rem;
}
.t-side-badge {
  display: inline-flex; align-items: center; padding: 0.25rem 0.75rem;
  border-radius: 9999px; font-size: 0.9375rem; font-weight: 700;
  color: var(--t-dark); background: var(--t-bg1); border: 1.5px solid var(--t-light);
}
.t-side-label { font-weight: 600; color: #64748b; }
.t-bool-grid-single { grid-template-columns: 1fr; }

/* ============================================================
   NOMAD VISAS (filters, visa name, req/tax text)
   ============================================================ */

.t-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.t-filter-pill {
  padding: 0.375rem 0.875rem; border: 1.5px solid #cbd5e1; border-radius: 9999px;
  background: white; font-size: 0.9375rem; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.t-filter-pill:hover { border-color: var(--t-light); color: var(--t-accent); }
.t-pill-active { background: var(--t-accent); color: white; border-color: var(--t-accent); }
.t-pill-active:hover { background: var(--t-mid); border-color: var(--t-mid); color: white; }
.t-detail-visa-name { display: block; font-size: 1rem; color: var(--t-mid); margin-top: 0.125rem; }
.t-renew-icon { color: var(--t-accent); font-weight: 700; font-size: 1rem; }
.t-req-text { font-size: 0.9375rem; color: #334155; line-height: 1.5; }
.t-tax-text { font-size: 0.9375rem; color: #334155; line-height: 1.5; }

/* ============================================================
   EXPAT BANKING (pitfalls note)
   ============================================================ */

.t-pitfalls-note {
  display: flex; align-items: flex-start; gap: 0.5rem;
  padding: 0.75rem; background: #fffbeb; border-radius: 0.5rem;
  margin-top: 0.75rem; border: 1px solid #fde68a;
}
.t-pitfalls-note svg { flex-shrink: 0; color: #d97706; margin-top: 0.0625rem; }
.t-pitfalls-note span { font-size: 0.9375rem; color: #92400e; line-height: 1.4; }

/* ============================================================
   INSURANCE LIFE (tax note)
   ============================================================ */

.t-tax-note {
  font-size: 0.9375rem; color: var(--t-mid); background: var(--t-bg1);
  padding: 0.5rem 0.75rem; border-radius: 0.5rem; margin-top: 0.5rem; line-height: 1.4;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes tLoadShow { to { opacity: 1; } }
@keyframes tSpin { to { transform: rotate(360deg); } }
@keyframes tFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes tSlideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .t-hero h1 { font-size: 1.625rem; }
  .t-grid { grid-template-columns: 1fr 1fr; }
  .t-detail-grid { grid-template-columns: 1fr; }
  .t-detail-card { padding: 1.25rem; }
  .t-progress-bar { width: 5rem; }
  .t-tax-example-grid { grid-template-columns: 1fr 1fr; }
  .t-calc-grid { grid-template-columns: 1fr 1fr; }
  .t-stats-grid { grid-template-columns: 1fr 1fr; }
  .t-detail-block-wide { grid-column: 1; }
}

@media (max-width: 480px) {
  .t-container { padding: 0 1rem; }
  .t-hero h1 { font-size: 1.5rem; }
  .t-grid { grid-template-columns: 1fr; }
  .t-card { padding: 0.5rem 0.75rem; max-width: 100%; overflow: hidden; }
  .t-badge {
    font-size: 0.875rem;
    padding: 0.125rem 0.375rem;
    flex-shrink: 1;
    min-width: 0;
  }
  .t-card-name { font-size: 0.9375rem; }
  .t-cost-label,
  .t-score-label { min-width: 4.5rem; font-size: 0.875rem; }
  .t-cost-val { min-width: 5rem; font-size: 0.875rem; }
  .t-checklist-header { flex-direction: column; align-items: flex-start; }
  .t-tax-example-grid { grid-template-columns: 1fr; }
  .t-calc-grid { grid-template-columns: 1fr; }
  .t-stats-grid { grid-template-columns: 1fr; }
  .t-expat-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .t-container { padding: 0 0.75rem; }
  .t-card { padding: 0.375rem 0.5rem; gap: 0.375rem; }
  .t-badge { font-size: 0.875rem; padding: 0.0625rem 0.25rem; }
  .t-card-name { font-size: 0.875rem; }
  .t-card-cost, .t-card-meta, .t-card-stat, .t-card-sub { font-size: 0.875rem; }
  .t-cost-label, .t-score-label { min-width: 3.5rem; font-size: 0.875rem; }
  .t-cost-val { min-width: 4rem; font-size: 0.875rem; }
  .t-detail-card { padding: 0.875rem; }
}
