/*
 * Tamizha Jobs — shared web design system.
 *
 * Every class is prefixed `tj-` because logged-in pages still load legacy
 * stylesheets (Bootstrap, style.css, employeeStyle.css) for their inner
 * content; unprefixed names like .container/.btn/.header would collide.
 * Served as a plain static file — no Vite build step required.
 */

:root {
  --tj-primary: #2563eb;
  --tj-primary-dark: #1d4ed8;
  --tj-primary-soft: #eff6ff;
  --tj-ink: #0f172a;
  --tj-text: #334155;
  --tj-muted: #64748b;
  --tj-border: #e2e8f0;
  --tj-bg: #f6f8fb;
  --tj-surface: #ffffff;
  --tj-success: #15803d;
  --tj-success-soft: #dcfce7;
  --tj-warn: #a16207;
  --tj-warn-soft: #fef9c3;
  --tj-danger: #b91c1c;
  --tj-danger-soft: #fee2e2;
  --tj-radius: 12px;
  --tj-radius-sm: 8px;
  --tj-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --tj-shadow-lg: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --tj-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Tamil', sans-serif;
  --tj-header-h: 64px;
  --tj-tabbar-h: 64px;
}

/* ---------- Base (only on pages using the site layout) ---------- */
body.tj-body {
  margin: 0;
  background: var(--tj-bg);
  color: var(--tj-text);
  font-family: var(--tj-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.tj-body *, body.tj-body *::before, body.tj-body *::after { box-sizing: border-box; }
body.tj-body.tj-has-tabbar { padding-bottom: var(--tj-tabbar-h); }
.tj-body h1, .tj-body h2, .tj-body h3 { color: var(--tj-ink); line-height: 1.25; margin: 0; font-family: var(--tj-font); }
.tj-body img { max-width: 100%; height: auto; }
.tj-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tj-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.tj-container--narrow { max-width: 760px; }
.tj-main { flex: 1 0 auto; padding: 28px 0 56px; }

/* ---------- Buttons ---------- */
.tj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--tj-radius-sm);
  font: 600 14px/1 var(--tj-font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.tj-btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
.tj-btn--primary { background: var(--tj-primary); color: #fff; }
.tj-btn--primary:hover { background: var(--tj-primary-dark); color: #fff; }
.tj-btn--outline { background: var(--tj-surface); color: var(--tj-primary); border-color: var(--tj-primary); }
.tj-btn--outline:hover { background: var(--tj-primary-soft); }
.tj-btn--ghost { background: transparent; color: var(--tj-text); }
.tj-btn--ghost:hover { background: #f1f5f9; }
.tj-btn--muted { background: #f1f5f9; color: var(--tj-muted); cursor: default; }
.tj-btn--lg { height: 50px; padding: 0 24px; font-size: 15px; }
.tj-btn--block { display: flex; width: 100%; }

/* ---------- Header ---------- */
.tj-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--tj-border); }
.tj-header__inner { display: flex; align-items: center; gap: 28px; height: var(--tj-header-h); }
.tj-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tj-ink); font-weight: 800; font-size: 18px; letter-spacing: -.01em; flex-shrink: 0; }
.tj-logo img { width: 32px; height: 32px; border-radius: 8px; }
.tj-logo span span { color: var(--tj-primary); }
.tj-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.tj-nav a { position: relative; display: inline-flex; align-items: center; height: var(--tj-header-h); padding: 0 12px; color: var(--tj-text); font-weight: 500; font-size: 14px; text-decoration: none; }
.tj-nav a:hover { color: var(--tj-primary); }
.tj-nav a.is-active { color: var(--tj-primary); }
.tj-nav a.is-active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--tj-primary); border-radius: 2px; }
.tj-header__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tj-header__user { display: inline-flex; align-items: center; gap: 8px; color: var(--tj-text); font-size: 14px; font-weight: 500; text-decoration: none; padding: 4px 8px 4px 4px; border-radius: 999px; }
.tj-header__user:hover { background: #f1f5f9; }
.tj-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tj-primary-soft); color: var(--tj-primary); font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* ---------- Mobile tab bar (signed-in only) ---------- */
.tj-tabbar { display: none; }
@media (max-width: 860px) {
  .tj-nav, .tj-header__hide-sm { display: none; }
  .tj-header__inner { gap: 12px; }
  .tj-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: var(--tj-tabbar-h);
    background: var(--tj-surface); border-top: 1px solid var(--tj-border); padding-bottom: env(safe-area-inset-bottom);
  }
  .tj-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--tj-muted); font-size: 11px; font-weight: 500; text-decoration: none; }
  .tj-tabbar a.is-active { color: var(--tj-primary); }
  .tj-tabbar svg { width: 22px; height: 22px; }
}
@media (min-width: 861px) { body.tj-body.tj-has-tabbar { padding-bottom: 0; } }

/* ---------- Page heading / breadcrumb ---------- */
.tj-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 13px; color: var(--tj-muted); }
.tj-breadcrumb a { color: var(--tj-muted); text-decoration: none; }
.tj-breadcrumb a:hover { color: var(--tj-primary); text-decoration: underline; }
.tj-breadcrumb [aria-current] { color: var(--tj-text); }
.tj-page-head { margin-bottom: 22px; }
.tj-page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.tj-page-head p { margin: 8px 0 0; color: var(--tj-muted); font-size: 15px; max-width: 70ch; }
@media (max-width: 640px) { .tj-page-head h1 { font-size: 23px; } }

/* ---------- Cards ---------- */
.tj-card { background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); box-shadow: var(--tj-shadow); padding: 22px; }
.tj-card + .tj-card { margin-top: 16px; }
/* Stacked cards get a gap; cards laid out side by side in a grid don't. */
.tj-split > .tj-card + .tj-card, [class*="grid"] > .tj-card + .tj-card, [class*="-cols"] > .tj-card + .tj-card { margin-top: 0; }
/* Specific enough to beat the `.tj-body h2 { margin: 0 }` heading reset. */
.tj-body .tj-card__title, .tj-card__title { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.tj-body .tj-section-title, .tj-section-title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 16px; }

/* ---------- Search bar ---------- */
.tj-search { display: grid; grid-template-columns: 1fr 240px auto; gap: 10px; background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); padding: 10px; box-shadow: var(--tj-shadow-lg); }
.tj-search__field { position: relative; display: flex; align-items: center; }
.tj-search__field svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--tj-muted); pointer-events: none; }
.tj-search__field input, .tj-search__field select { width: 100%; height: 48px; padding: 0 14px 0 42px; border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm); background: #fff; color: var(--tj-ink); font: 500 15px var(--tj-font); appearance: none; -webkit-appearance: none; }
.tj-search__field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.tj-search__field input:focus, .tj-search__field select:focus { outline: none; border-color: var(--tj-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.tj-search .tj-btn { height: 48px; padding: 0 26px; }
@media (max-width: 760px) { .tj-search { grid-template-columns: 1fr; } }

/* ---------- Home hero ---------- */
.tj-hero { background: linear-gradient(180deg, #eaf1ff 0%, var(--tj-bg) 100%); padding: 56px 0 44px; border-bottom: 1px solid var(--tj-border); }
.tj-hero h1 { font-size: 40px; font-weight: 800; letter-spacing: -.03em; max-width: 22ch; }
.tj-hero h1 span { color: var(--tj-primary); }
.tj-hero p { margin: 12px 0 26px; font-size: 17px; color: var(--tj-muted); max-width: 60ch; }
.tj-hero__popular { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--tj-muted); }
.tj-hero__popular a { color: var(--tj-text); text-decoration: none; background: #fff; border: 1px solid var(--tj-border); padding: 4px 12px; border-radius: 999px; }
.tj-hero__popular a:hover { border-color: var(--tj-primary); color: var(--tj-primary); }
.tj-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.tj-stats div { font-size: 13px; color: var(--tj-muted); }
.tj-stats strong { display: block; font-size: 22px; color: var(--tj-ink); font-weight: 800; }
@media (max-width: 640px) { .tj-hero { padding: 36px 0 28px; } .tj-hero h1 { font-size: 29px; } .tj-hero p { font-size: 15px; } }

.tj-section { padding: 44px 0; }
.tj-section--white { background: var(--tj-surface); border-top: 1px solid var(--tj-border); border-bottom: 1px solid var(--tj-border); }
.tj-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tj-section__head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.tj-section__head p { margin: 6px 0 0; color: var(--tj-muted); }
.tj-link { color: var(--tj-primary); font-weight: 600; text-decoration: none; font-size: 14px; white-space: nowrap; }
.tj-link:hover { text-decoration: underline; }

/* ---------- Chips (district / work-type links) ---------- */
.tj-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tj-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--tj-border); border-radius: 999px; background: var(--tj-surface); color: var(--tj-text); font-size: 14px; font-weight: 500; text-decoration: none; line-height: 1.2; }
.tj-chip:hover { border-color: var(--tj-primary); color: var(--tj-primary); }
.tj-chip.is-active { background: var(--tj-primary); border-color: var(--tj-primary); color: #fff; }
.tj-chip small { color: var(--tj-muted); font-size: 12px; font-weight: 500; }
.tj-chip.is-active small { color: rgba(255, 255, 255, .8); }

/* ---------- Job list + cards ---------- */
.tj-grid-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tj-job-list { display: flex; flex-direction: column; gap: 12px; }
.tj-job { position: relative; display: flex; gap: 16px; background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); padding: 18px 20px; transition: border-color .15s, box-shadow .15s; }
.tj-job:hover { border-color: #bfd3fb; box-shadow: var(--tj-shadow-lg); }
.tj-job__logo { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 10px; background: var(--tj-primary-soft); color: var(--tj-primary); font-weight: 800; font-size: 19px; flex-shrink: 0; }
.tj-job__body { min-width: 0; flex: 1; }
.tj-job__title { font-size: 16.5px; font-weight: 700; margin: 0; line-height: 1.3; }
.tj-job__title a { color: var(--tj-ink); text-decoration: none; }
.tj-job__title a::after { content: ''; position: absolute; inset: 0; border-radius: var(--tj-radius); } /* whole card clickable */
.tj-job__title a:hover { color: var(--tj-primary); }
.tj-job__company { margin: 3px 0 0; font-size: 14px; color: var(--tj-muted); }
.tj-job__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--tj-text); }
.tj-job__meta li { display: inline-flex; align-items: center; gap: 5px; }
.tj-job__meta svg { width: 15px; height: 15px; color: var(--tj-muted); flex-shrink: 0; }
.tj-job__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; margin-top: 12px; font-size: 12.5px; color: var(--tj-muted); }
.tj-salary { white-space: nowrap; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; background: var(--tj-success-soft); color: var(--tj-success); font-weight: 600; font-size: 13px; }

/* ---------- Badges ---------- */
.tj-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; background: #f1f5f9; color: var(--tj-muted); white-space: nowrap; }
.tj-badge--new { background: var(--tj-primary-soft); color: var(--tj-primary); }
.tj-badge--pending { background: var(--tj-warn-soft); color: var(--tj-warn); }
.tj-badge--reviewed { background: var(--tj-primary-soft); color: var(--tj-primary); }
.tj-badge--accepted, .tj-badge--active { background: var(--tj-success-soft); color: var(--tj-success); }
.tj-badge--rejected, .tj-badge--expired { background: var(--tj-danger-soft); color: var(--tj-danger); }

/* ---------- Two-column layouts ---------- */
.tj-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.tj-split--left { grid-template-columns: 280px minmax(0, 1fr); }
.tj-sticky { position: sticky; top: calc(var(--tj-header-h) + 16px); }
@media (max-width: 960px) { .tj-split, .tj-split--left { grid-template-columns: 1fr; } .tj-sticky { position: static; } }

/* ---------- Filters panel ---------- */
.tj-filters .tj-field + .tj-field { margin-top: 14px; }
.tj-filters__actions { display: flex; gap: 8px; margin-top: 18px; }
.tj-filters__actions .tj-btn { flex: 1; }
.tj-results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: 14px; color: var(--tj-muted); }
.tj-results-bar strong { color: var(--tj-ink); }

/* ---------- Forms ---------- */
.tj-field { display: flex; flex-direction: column; gap: 6px; }
.tj-label { font-size: 13px; font-weight: 600; color: var(--tj-ink); }
.tj-input, .tj-select, .tj-textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm);
  background: #fff; color: var(--tj-ink); font: 500 14.5px var(--tj-font);
}
.tj-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.tj-select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.tj-input:focus, .tj-select:focus, .tj-textarea:focus { outline: none; border-color: var(--tj-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.tj-hint { font-size: 12.5px; color: var(--tj-muted); }
.tj-error { font-size: 12.5px; color: var(--tj-danger); }

/* ---------- Alerts / empty ---------- */
.tj-alert { padding: 12px 16px; border-radius: var(--tj-radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.tj-alert--info { background: var(--tj-primary-soft); color: #1e40af; border-color: #bfdbfe; }
.tj-alert--success { background: var(--tj-success-soft); color: var(--tj-success); border-color: #bbf7d0; }
.tj-alert--error { background: var(--tj-danger-soft); color: var(--tj-danger); border-color: #fecaca; }
.tj-empty { text-align: center; padding: 48px 20px; background: var(--tj-surface); border: 1px dashed var(--tj-border); border-radius: var(--tj-radius); }
.tj-empty h2 { font-size: 18px; margin-bottom: 6px; }
.tj-empty p { color: var(--tj-muted); margin: 0 0 16px; }

/* ---------- Job detail ---------- */
.tj-jobhead { display: flex; gap: 18px; align-items: flex-start; }
.tj-jobhead .tj-job__logo { width: 60px; height: 60px; font-size: 24px; border-radius: 14px; }
.tj-jobhead h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.tj-jobhead__company { margin: 4px 0 0; font-size: 15px; color: var(--tj-muted); }
.tj-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.tj-facts li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm); background: #fbfcfe; }
.tj-facts svg { width: 18px; height: 18px; color: var(--tj-primary); flex-shrink: 0; margin-top: 2px; }
.tj-facts span { display: block; font-size: 12px; color: var(--tj-muted); }
.tj-facts strong { display: block; font-size: 14px; color: var(--tj-ink); font-weight: 600; }
.tj-prose { color: var(--tj-text); font-size: 15px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.tj-summary { margin: 16px 0 0; font-size: 15px; color: var(--tj-text); }
.tj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tj-tags li { padding: 4px 10px; border-radius: 6px; background: #f1f5f9; font-size: 13px; color: var(--tj-text); }
.tj-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.tj-dl dt { color: var(--tj-muted); }
.tj-dl dd { margin: 0; color: var(--tj-ink); font-weight: 500; overflow-wrap: anywhere; }
.tj-faq details { border-bottom: 1px solid var(--tj-border); padding: 14px 0; }
.tj-faq details:last-child { border-bottom: 0; padding-bottom: 0; }
.tj-faq summary { cursor: pointer; font-weight: 600; color: var(--tj-ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tj-faq summary::-webkit-details-marker { display: none; }
.tj-faq summary::after { content: '+'; color: var(--tj-muted); font-weight: 400; font-size: 18px; line-height: 1; }
.tj-faq details[open] summary::after { content: '–'; }
.tj-faq p { margin: 8px 0 0; color: var(--tj-text); }
.tj-links { margin: 0; padding: 0; list-style: none; }
.tj-links li + li { border-top: 1px solid var(--tj-border); }
.tj-links a { display: block; padding: 11px 0; text-decoration: none; color: var(--tj-ink); font-weight: 600; font-size: 14px; }
.tj-links a:hover { color: var(--tj-primary); }
.tj-links small { display: block; font-weight: 400; color: var(--tj-muted); font-size: 12.5px; margin-top: 2px; }
.tj-applybar { display: none; }
@media (max-width: 960px) {
  .tj-applybar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--tj-surface); border-top: 1px solid var(--tj-border); box-shadow: 0 -6px 20px rgba(15, 23, 42, .06); }
  body.tj-has-applybar { padding-bottom: 76px; }
  body.tj-has-applybar.tj-has-tabbar .tj-applybar { bottom: var(--tj-tabbar-h); }
  body.tj-has-applybar.tj-has-tabbar { padding-bottom: calc(76px + var(--tj-tabbar-h)); }
  .tj-jobhead h1 { font-size: 22px; }
}

/* ---------- Pagination ---------- */
.tj-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 28px 0 0; padding: 0; list-style: none; }
.tj-pagination a, .tj-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--tj-border); border-radius: var(--tj-radius-sm); background: var(--tj-surface); color: var(--tj-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.tj-pagination a:hover { border-color: var(--tj-primary); color: var(--tj-primary); }
.tj-pagination [aria-current] { background: var(--tj-primary); border-color: var(--tj-primary); color: #fff; }
.tj-pagination .is-disabled { color: #cbd5e1; background: #f8fafc; }
.tj-pagination .is-gap { border: 0; background: transparent; min-width: 20px; padding: 0; }
.tj-pagination__info { width: 100%; text-align: center; font-size: 13px; color: var(--tj-muted); margin-top: 6px; }

/* ---------- Feature blocks (home) ---------- */
.tj-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tj-feature { background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); padding: 22px; }
.tj-feature h3 { font-size: 16px; font-weight: 700; margin: 12px 0 6px; }
.tj-feature p { margin: 0; color: var(--tj-muted); font-size: 14px; }
.tj-feature__icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--tj-primary-soft); color: var(--tj-primary); }
.tj-feature__icon svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .tj-features { grid-template-columns: 1fr; } }
.tj-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; border-radius: 16px; background: var(--tj-ink); color: #cbd5e1; }
.tj-banner h2 { color: #fff; font-size: 24px; font-weight: 800; }
.tj-banner p { margin: 8px 0 0; }
.tj-banner--blue { background: var(--tj-primary); color: #dbeafe; }
@media (max-width: 760px) { .tj-banner { flex-direction: column; align-items: flex-start; padding: 24px; } }

/* ---------- Footer ---------- */
.tj-footer { flex-shrink: 0; background: #0b1220; color: #94a3b8; padding: 44px 0 24px; font-size: 14px; }
.tj-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.tj-footer h3 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.tj-footer ul { list-style: none; margin: 0; padding: 0; }
.tj-footer li + li { margin-top: 8px; }
.tj-footer a { color: #cbd5e1; text-decoration: none; }
.tj-footer a:hover { color: #fff; text-decoration: underline; }
.tj-footer .tj-logo { color: #fff; }
.tj-footer__about { margin: 12px 0 0; max-width: 34ch; line-height: 1.6; }
.tj-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid #1e293b; font-size: 13px; }
@media (max-width: 860px) { .tj-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .tj-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Blog ---------- */
.tj-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 960px) { .tj-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tj-posts { grid-template-columns: 1fr; } }
.tj-post-card { display: flex; flex-direction: column; height: 100%; background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); box-shadow: var(--tj-shadow); overflow: hidden; }
.tj-post-card:hover { border-color: #bfdbfe; box-shadow: var(--tj-shadow-lg); }
.tj-post-card__img { display: block; aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; background: #e2e8f0; }
.tj-post-card__ph { display: flex; align-items: flex-end; aspect-ratio: 16 / 5; padding: 16px; background: linear-gradient(135deg, var(--tj-primary) 0%, #1e3a8a 100%); color: #dbeafe; font-size: 13px; font-weight: 600; }
.tj-post-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px; flex: 1; }
.tj-post-card h2, .tj-post-card h3 { font-size: 17px; font-weight: 700; line-height: 1.35; }
.tj-post-card h2 a, .tj-post-card h3 a { color: var(--tj-ink); text-decoration: none; }
.tj-post-card h2 a::after, .tj-post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.tj-post-card { position: relative; }
.tj-post-card p { margin: 0; color: var(--tj-muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tj-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--tj-muted); font-size: 13px; }
.tj-post-meta a { color: var(--tj-text); font-weight: 600; text-decoration: none; position: relative; z-index: 1; }
.tj-post-meta a:hover { color: var(--tj-primary); text-decoration: underline; }
.tj-post-card .tj-post-meta { margin-top: auto; padding-top: 6px; }

.tj-article { max-width: 760px; }
.tj-article__head h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
@media (max-width: 640px) { .tj-article__head h1 { font-size: 26px; } }
.tj-article__head .tj-post-meta { margin-top: 14px; }
.tj-answer { margin: 20px 0 0; padding: 16px 18px; border-left: 4px solid var(--tj-primary); background: var(--tj-primary-soft); border-radius: 0 var(--tj-radius-sm) var(--tj-radius-sm) 0; color: var(--tj-ink); font-size: 16.5px; line-height: 1.6; }
.tj-article__cover { display: block; width: 100%; height: auto; margin: 22px 0 0; border-radius: var(--tj-radius); background: #e2e8f0; }
.tj-toc { margin: 24px 0 0; padding: 16px 18px; background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); }
.tj-toc h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--tj-muted); margin-bottom: 8px; }
.tj-toc ol { margin: 0; padding-left: 20px; }
.tj-toc li { margin: 4px 0; }
.tj-toc a { color: var(--tj-text); text-decoration: none; font-size: 14.5px; }
.tj-toc a:hover { color: var(--tj-primary); text-decoration: underline; }

.tj-md { margin-top: 26px; color: var(--tj-text); font-size: 16.5px; line-height: 1.75; overflow-wrap: anywhere; }
.tj-md > :first-child { margin-top: 0; }
.tj-md h2 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; margin: 38px 0 12px; scroll-margin-top: calc(var(--tj-header-h) + 16px); }
.tj-md h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; scroll-margin-top: calc(var(--tj-header-h) + 16px); }
.tj-md h4 { font-size: 16.5px; margin: 22px 0 8px; color: var(--tj-ink); }
.tj-md p { margin: 0 0 16px; }
.tj-md ul, .tj-md ol { margin: 0 0 16px; padding-left: 24px; }
.tj-md li { margin: 6px 0; }
.tj-md a { color: var(--tj-primary); text-decoration: underline; text-underline-offset: 2px; }
.tj-md strong { color: var(--tj-ink); }
.tj-md blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 3px solid var(--tj-border); color: var(--tj-muted); }
.tj-md img { max-width: 100%; height: auto; border-radius: var(--tj-radius-sm); }
.tj-md hr { border: 0; border-top: 1px solid var(--tj-border); margin: 28px 0; }
.tj-md code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.tj-md pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: var(--tj-radius-sm); overflow-x: auto; }
.tj-md pre code { background: none; padding: 0; }
.tj-md table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; display: block; overflow-x: auto; }
.tj-md th, .tj-md td { border: 1px solid var(--tj-border); padding: 8px 10px; text-align: left; vertical-align: top; }
.tj-md th { background: #f8fafc; color: var(--tj-ink); }

.tj-article .tj-faq { margin-top: 32px; }
.tj-article .tj-faq h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.tj-article .tj-faq h3 { display: inline; font-size: 16px; font-weight: 600; }
.tj-article__tags { margin-top: 26px; }
.tj-article__tags a { text-decoration: none; color: inherit; }
.tj-byline { display: flex; gap: 14px; align-items: center; margin-top: 28px; padding: 18px; background: var(--tj-surface); border: 1px solid var(--tj-border); border-radius: var(--tj-radius); }
.tj-byline .tj-avatar { width: 44px; height: 44px; font-size: 17px; }
.tj-byline p { margin: 2px 0 0; color: var(--tj-muted); font-size: 14px; }
.tj-byline a { color: var(--tj-ink); font-weight: 700; text-decoration: none; }
.tj-byline a:hover { color: var(--tj-primary); text-decoration: underline; }
.tj-cta { margin-top: 28px; padding: 22px; border-radius: var(--tj-radius); background: var(--tj-ink); color: #cbd5e1; }
.tj-cta h2 { color: #fff; font-size: 20px; font-weight: 800; }
.tj-cta p { margin: 8px 0 14px; }
.tj-cta .tj-chips { margin-bottom: 16px; }
.tj-cta .tj-chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.tj-cta .tj-chip:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.tj-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tj-preview-bar { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--tj-radius-sm); background: var(--tj-warn-soft); color: var(--tj-warn); font-size: 14px; font-weight: 600; }

/* ---------- Legacy content inside the new shell ----------
 * Logged-in pages keep their own inner markup/styles; neutralise the old
 * full-screen shell rules that would otherwise fight the new header. */
.tj-legacy { width: 100%; }
.tj-legacy .main-content, .tj-legacy .content-wrapper { margin: 0 !important; width: 100% !important; max-width: none !important; height: auto !important; overflow: visible !important; box-shadow: none; }

@media print { .tj-header, .tj-footer, .tj-tabbar, .tj-applybar { display: none !important; } }
