/* ═══════════════════════════════════════════════════════════════════════
   HOMEPAGE v2 — only loaded on the front page (see jdx_home_assets()).
   Every color/spacing token below is one already defined site-wide in
   style.css (:root / [data-theme="dark"]) — nothing new is introduced,
   so this automatically matches the existing light/dark theme toggle.
   All classes are prefixed "jh-" to avoid touching any other template.
═══════════════════════════════════════════════════════════════════════ */

.jh-sec{padding:52px 0}
.jh-sec.alt{background:var(--bg-2)}
.jh-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.jh-head h2{font-family:var(--font-display);font-size:1.5rem;font-weight:800;letter-spacing:-.02em;margin:0}
.jh-head p{color:var(--text-3);font-size:.92rem;margin-top:4px;max-width:60ch}
.jh-more{font-weight:700;font-size:.88rem;color:var(--brand);white-space:nowrap}
.jh-more:hover{color:var(--brand-h)}
.jh-empty{padding:20px 0;color:var(--text-3);font-size:.92rem}

/* ── Hero / search ─────────────────────────────────────────────────── */
.jh-hero{background:var(--bg-2);padding:44px 0 36px}
.jh-hero-grid{display:grid;gap:28px}
.jh-hero h1{font-family:var(--font-display);font-size:1.9rem;font-weight:800;letter-spacing:-.02em;line-height:1.15}
.jh-hero .jh-lead{color:var(--text-3);margin-top:8px;font-size:.95rem}
.jh-scope{display:flex;gap:6px;overflow-x:auto;margin:18px -20px 10px;padding:0 20px;scrollbar-width:none}
.jh-scope::-webkit-scrollbar{display:none}
.jh-scope button{flex:none;border:1px solid var(--border-2);background:var(--surface);padding:7px 13px;border-radius:99px;font-size:.8rem;font-weight:700;color:var(--text-2)}
.jh-scope button.on{background:var(--text);border-color:var(--text);color:var(--bg)}
.jh-field{display:flex;align-items:center;gap:8px;background:var(--surface);border:2px solid var(--border-2);border-radius:16px;padding:6px 6px 6px 14px;position:relative}
.jh-field:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-dim)}
.jh-field svg{flex:none;color:var(--text-3)}
.jh-field input{flex:1;min-width:0;border:0;background:none;outline:0;font-size:16px;height:46px;color:var(--text)}
.jh-field input::placeholder{color:var(--text-3)}
.jh-go{border:0;background:var(--brand-h);color:#fff;font-weight:800;padding:0 20px;height:44px;border-radius:12px;flex:none}
.jh-go:hover{background:var(--brand)}
.jh-suggest{position:absolute;left:0;right:0;top:calc(100% + 6px);background:var(--surface);border:1px solid var(--border-2);border-radius:16px;box-shadow:var(--shadow-lg);padding:8px;z-index:50;max-height:360px;overflow:auto}
.jh-suggest[hidden]{display:none}
.jh-suggest h4{font-size:.72rem;font-weight:700;color:var(--text-3);padding:8px 10px 4px;text-transform:uppercase;letter-spacing:.04em}
.jh-suggest a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;font-size:.92rem;font-weight:600;color:var(--text)}
.jh-suggest a:hover{background:var(--bg-2)}
.jh-suggest a small{margin-left:auto;color:var(--text-3);font-weight:400;font-size:.78rem}
.jh-popq{margin-top:12px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:.82rem;color:var(--text-3)}
.jh-popq a{border:1px solid var(--border-2);border-radius:99px;padding:5px 11px;font-weight:700;color:var(--text-2);background:var(--surface)}
.jh-popq a:hover{border-color:var(--brand);color:var(--brand)}
.jh-pulse{display:flex;gap:16px;margin-top:14px;font-size:.82rem;color:var(--text-3);flex-wrap:wrap}
.jh-pulse b{color:var(--text);font-weight:800}

.jh-today{display:none}
.jh-today h2{font-family:var(--font-display);font-size:1.1rem;font-weight:800;margin-bottom:6px}
.jh-today ul{border-top:1px solid var(--border)}
.jh-today li{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--border);font-size:.88rem;font-weight:700}
.jh-today li a{color:var(--text)}
.jh-today li a:hover{color:var(--brand)}
.jh-kind{flex:none;width:92px;text-align:center;font-size:.72rem;font-weight:800;padding:4px 0;border-radius:99px}
.jh-kind-job{background:var(--red-dim);color:var(--red)}
.jh-kind-exam{background:var(--blue-dim);color:var(--blue)}
.jh-kind-res{background:var(--green-dim);color:var(--green)}
.jh-kind-adm{background:var(--gold-dim);color:var(--gold)}
.jh-kind-sch{background:var(--purple-dim);color:var(--purple)}

/* ── Quick access grid ─────────────────────────────────────────────── */
.jh-quick{padding:34px 0}
.jh-qgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px 6px}
.jh-q{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:4px 2px;color:var(--text)}
.jh-q .jh-tile{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:var(--brand-dim);font-size:1.4rem}
.jh-q b{font-size:.82rem;font-weight:800;line-height:1.15}
.jh-q small{font-size:.72rem;color:var(--text-3);line-height:1.1}

/* ── Tabs (shared by Latest updates / Browse / Results) ────────────── */
.jh-tabs{display:flex;gap:6px;overflow-x:auto;margin:0 0 6px;padding:0;scrollbar-width:none;border-bottom:1px solid var(--border)}
.jh-tabs::-webkit-scrollbar{display:none}
.jh-tabs button{flex:none;border:0;background:none;padding:10px 4px;margin-right:20px;font-weight:700;font-size:.9rem;color:var(--text-3);border-bottom:3px solid transparent}
.jh-tabs button.on{color:var(--text);border-bottom-color:var(--brand)}
.jh-panel{display:none}
.jh-panel.on{display:block}

/* ── List rows (jobs / exams / results / admit / centers / study feed items) ── */
.jh-list{border-top:1px solid var(--border)}
.jh-row{display:grid;grid-template-columns:76px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--border)}
.jh-stub{border-radius:10px;padding:8px 4px;text-align:center;display:flex;flex-direction:column;justify-content:center;gap:1px;background:var(--bg-3);color:var(--text-2)}
.jh-stub .l{font-size:.66rem;color:var(--text-3);font-weight:600}
.jh-stub b{font-family:var(--font-display);font-size:1.05rem;line-height:1.1;letter-spacing:-.02em}
.jh-stub .r{font-size:.66rem;font-weight:700;line-height:1.2}
.jh-stub.closing{background:var(--red-dim);color:var(--red)}
.jh-stub.closing .l{color:var(--red)}
.jh-stub.soon{background:var(--blue-dim);color:var(--blue)}
.jh-stub.soon .l{color:var(--blue)}
.jh-row-t{font-family:var(--font-display);font-weight:800;font-size:1rem;line-height:1.3;color:var(--text)}
.jh-row-t:hover{color:var(--brand)}
.jh-row-o{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:3px;color:var(--text-3);font-size:.88rem}
.jh-chip{flex:none;font-size:.72rem;font-weight:800;padding:3px 9px;border-radius:99px}
.jh-chip.live{background:var(--green-dim);color:var(--green)}
.jh-chip.closing{background:var(--red-dim);color:var(--red)}
.jh-chip.soon{background:var(--blue-dim);color:var(--blue)}
.jh-chip.grey{background:var(--bg-3);color:var(--text-2)}
.jh-meta{display:flex;gap:20px;margin:8px 0 0;flex-wrap:wrap}
.jh-meta div dt{font-size:.68rem;color:var(--text-3)}
.jh-meta div dd{margin:0;font-weight:700;font-size:.86rem}

.jh-item{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--border)}
.jh-lead{justify-self:center;text-align:center;font-family:var(--font-display);font-weight:800;font-size:.92rem;line-height:1.1;color:var(--text-2)}
.jh-lead small{display:block;font-family:var(--font-body);font-weight:600;font-size:.68rem;color:var(--text-3);margin-top:2px}
.jh-lead.ico{width:44px;height:44px;border-radius:12px;background:var(--brand-dim);display:grid;place-items:center;font-size:1.2rem}
.jh-item .t{font-weight:800;font-size:.92rem;line-height:1.3;display:block;color:var(--text)}
.jh-item .t:hover{color:var(--brand)}
.jh-item .o{font-size:.8rem;color:var(--text-3);display:block}
.jh-pill{border:1.5px solid var(--border-2);border-radius:99px;padding:6px 12px;font-size:.78rem;font-weight:800;white-space:nowrap;background:var(--surface);color:var(--text)}
.jh-pill:hover{border-color:var(--brand);color:var(--brand)}
.jh-more-btn{display:flex;align-items:center;justify-content:center;height:48px;margin-top:16px;border-radius:12px;border:1.5px solid var(--border-2);font-weight:800;background:var(--surface);color:var(--text)}
.jh-more-btn:hover{border-color:var(--brand)}

/* ── AI Match teaser ────────────────────────────────────────────────── */
.jh-ai{display:grid;gap:24px;align-items:center;background:var(--surface);border:1px solid var(--border-2);border-radius:20px;padding:28px}
.jh-ai h2{font-family:var(--font-display);font-size:1.35rem;font-weight:800}
.jh-ai p{color:var(--text-3);margin-top:8px;max-width:56ch}
.jh-ai .jh-stat{display:inline-flex;gap:8px;align-items:baseline;margin-top:14px;font-size:.85rem;color:var(--text-3)}
.jh-ai .jh-stat b{font-family:var(--font-display);font-size:1.3rem;color:var(--brand)}
.jh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:var(--brand-h);color:#fff;font-weight:800;height:48px;border-radius:12px;padding:0 22px;margin-top:16px}
.jh-btn:hover{background:var(--brand)}

/* ── Browse ────────────────────────────────────────────────────────── */
.jh-chips{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
.jh-cl{display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:12px;border:1px solid var(--border-2);background:var(--surface);font-weight:700;font-size:.88rem;color:var(--text)}
.jh-cl:hover{border-color:var(--brand)}
.jh-cl small{color:var(--text-3);font-weight:600;font-size:.76rem}
.jh-split{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
.jh-split a{border-radius:16px;padding:16px;border:1px solid var(--border-2);background:var(--surface);display:flex;flex-direction:column;gap:4px;color:var(--text)}
.jh-split a b{font-family:var(--font-display);font-size:1.05rem}
.jh-split a span{color:var(--text-3);font-size:.82rem}
.jh-split a.gov{background:var(--brand-dim);border-color:var(--brand-border)}

/* ── Horizontal scroll cards (exam calendar / schemes) ───────────────── */
.jh-hscroll{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -20px;padding:2px 20px 8px;scrollbar-width:none}
.jh-hscroll::-webkit-scrollbar{display:none}
.jh-cal{flex:none;width:150px;scroll-snap-align:start;border:1px solid var(--border-2);border-radius:14px;padding:12px 14px;background:var(--surface);display:grid;gap:2px}
.jh-cal .dd{font-family:var(--font-display);font-weight:800;font-size:1.7rem;line-height:1;color:var(--text)}
.jh-cal .mm{font-weight:800;font-size:.78rem;color:var(--brand)}
.jh-cal b{font-size:.85rem;line-height:1.25;margin-top:8px;color:var(--text)}
.jh-cal span{font-size:.76rem;color:var(--text-3)}
.jh-cal em{font-style:normal;font-size:.72rem;font-weight:800;color:var(--blue);margin-top:6px}
.jh-scheme{flex:none;width:230px;scroll-snap-align:start;border:1px solid var(--border-2);border-radius:14px;padding:14px;background:var(--surface);display:flex;flex-direction:column;gap:6px}
.jh-scheme .tag{align-self:flex-start;font-size:.72rem;font-weight:800;color:var(--purple);background:var(--purple-dim);padding:3px 9px;border-radius:99px}
.jh-scheme b{font-family:var(--font-display);font-size:.98rem;line-height:1.25;color:var(--text)}
.jh-scheme p{font-size:.82rem;color:var(--text-3)}
.jh-scheme a{margin-top:auto;padding-top:6px;font-weight:800;font-size:.82rem;color:var(--brand)}
.jh-links{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}

/* ── Results search + filter ──────────────────────────────────────── */
.jh-pick{display:flex;flex-wrap:wrap;gap:8px}
.jh-pick button{border:1.5px solid var(--border-2);background:var(--surface);padding:8px 13px;border-radius:99px;font-weight:700;font-size:.85rem;color:var(--text-2)}
.jh-pick button.on{background:var(--brand-dim);border-color:var(--brand);color:var(--brand)}

/* ── Form fill centers ─────────────────────────────────────────────── */
.jh-cen-find{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:16px}
.jh-cen-find .jh-field{flex:1 1 240px}
.jh-near{display:inline-flex;align-items:center;gap:8px;border:1.5px solid var(--brand-border);background:var(--brand-dim);color:var(--brand);font-weight:800;border-radius:12px;padding:10px 14px;font-size:.86rem}
.jh-cen{display:grid;gap:10px}
.jh-cen li{border:1px solid var(--border-2);border-radius:14px;padding:14px;background:var(--surface);display:grid;gap:10px;align-content:start}
.jh-cen-top{display:flex;justify-content:space-between;gap:10px}
.jh-cen-top b{font-family:var(--font-display);font-size:1rem;display:block;color:var(--text)}
.jh-cen-top span{font-size:.82rem;color:var(--text-3)}
.jh-km{flex:none;text-align:right;font-size:.98rem;color:var(--text)}
.jh-tags{display:flex;flex-wrap:wrap;gap:6px}
.jh-tags span{font-size:.76rem;font-weight:700;background:var(--bg-3);color:var(--text-2);padding:3px 9px;border-radius:8px}
.jh-cen-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.jh-open-now{font-size:.8rem;font-weight:800;color:var(--green)}
.jh-closed-now{font-size:.8rem;font-weight:800;color:var(--text-3)}
.jh-acts{display:flex;gap:6px}

/* ── State grid ───────────────────────────────────────────────────── */
.jh-states li{display:flex}
.jh-states a{flex:1;display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border);font-weight:700;font-size:.9rem;color:var(--text)}
.jh-states .bar{width:90px;height:8px;border-radius:99px;background:var(--bg-3);overflow:hidden}
.jh-states .bar i{display:block;height:100%;background:var(--brand);border-radius:99px}
.jh-states a b{text-align:right;font-size:.84rem;color:var(--text-2);min-width:34px}
.jh-states:not(.all) li:nth-child(n+7){display:none}
.jh-linkbtn{margin-top:10px;border:0;background:none;padding:8px 0;font-weight:800;color:var(--brand);font-size:.88rem}

/* ── Organizations ────────────────────────────────────────────────── */
.jh-orgs{display:grid;grid-template-columns:repeat(4,1fr);gap:16px 6px}
.jh-org{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;color:var(--text)}
.jh-org .mono{width:54px;height:54px;border-radius:50%;border:1.5px solid var(--border-2);display:grid;place-items:center;font-family:var(--font-display);font-weight:800;font-size:.82rem;color:var(--text-2);background:var(--surface)}
.jh-org:hover .mono{border-color:var(--brand);color:var(--brand)}
.jh-org b{font-size:.76rem;font-weight:800;line-height:1.2}
.jh-org small{font-size:.68rem;color:var(--text-3);line-height:1.1}

/* ── Study ────────────────────────────────────────────────────────── */
.jh-res a{display:grid;grid-template-columns:44px 1fr;gap:14px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border);color:var(--text)}
.jh-res .rico{width:44px;height:44px;border-radius:12px;background:var(--brand-dim);display:grid;place-items:center;font-size:1.2rem}
.jh-res b{font-family:var(--font-display);font-weight:800;font-size:.94rem;display:block}
.jh-res span{font-size:.82rem;color:var(--text-3)}

/* ── Alerts ───────────────────────────────────────────────────────── */
.jh-two{display:grid;gap:18px}
.jh-box{background:var(--surface);border:1px solid var(--border-2);border-radius:18px;padding:20px;display:grid;gap:14px}
.jh-box h3{font-family:var(--font-display);font-size:1.05rem;font-weight:800}
.jh-inp{width:100%;height:46px;border:1.5px solid var(--border-2);background:var(--surface);border-radius:12px;padding:0 12px;font-size:16px;color:var(--text)}
.jh-inp:focus{outline:0;border-color:var(--brand)}
.jh-row2{display:flex;gap:8px;flex-wrap:wrap}
.jh-row2 .jh-inp{flex:1;min-width:160px}
.jh-note{font-size:.8rem;color:var(--text-3)}
.jh-note.ok{color:var(--green);font-weight:700}
.jh-note.err{color:var(--red);font-weight:700}
.jh-join a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;border:1.5px solid var(--border-2);background:var(--surface);font-weight:800;color:var(--text);margin-top:10px}
.jh-join a small{display:block;font-weight:400;color:var(--text-3);font-size:.78rem}
.jh-join .wa{color:var(--green)}
.jh-join .tg{color:var(--blue)}
.jh-social{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.jh-social a{border:1px solid var(--border-2);border-radius:99px;padding:7px 14px;font-weight:700;font-size:.8rem;background:var(--surface);color:var(--text)}
.jh-social a:hover{border-color:var(--brand)}

/* ── Trust ────────────────────────────────────────────────────────── */
.jh-trust{display:grid;gap:16px}
.jh-trust-ico{display:flex;align-items:center;gap:8px;color:var(--green);font-weight:800;font-size:.86rem}
.jh-trust h2{font-family:var(--font-display);font-size:1.3rem;font-weight:800;margin:10px 0 8px}
.jh-trust p{color:var(--text-2);max-width:62ch}
.jh-tlinks{display:flex;flex-wrap:wrap;gap:8px}
.jh-tlinks a{border:1px solid var(--border-2);border-radius:10px;padding:8px 13px;font-weight:700;font-size:.86rem;background:var(--surface);color:var(--text)}
.jh-tlinks a:hover{border-color:var(--brand)}

/* ══ DESKTOP (≥900px) ═══════════════════════════════════════════════ */
@media (min-width:900px){
  .jh-sec{padding:64px 0}
  .jh-hero{padding:60px 0 52px}
  .jh-hero-grid{grid-template-columns:1.6fr 1fr;gap:48px;align-items:start}
  .jh-hero h1{font-size:2.6rem;max-width:18ch}
  .jh-scope{margin:18px 0 10px;padding:0;flex-wrap:wrap;overflow:visible}
  .jh-today{display:block}
  .jh-quick{padding:0 0 64px}
  .jh-qgrid{grid-template-columns:repeat(8,1fr)}
  .jh-list.split,.jh-feed-list{display:grid;grid-template-columns:1fr 1fr;column-gap:48px}
  .jh-ai{grid-template-columns:1.3fr 1fr;padding:40px}
  .jh-hscroll.grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible;margin:0;padding:0;gap:14px}
  .jh-hscroll.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;margin:0;padding:0;gap:14px}
  .jh-cal,.jh-scheme{width:auto}
  .jh-cen{grid-template-columns:repeat(3,minmax(0,1fr))}
  .jh-geo{display:grid;grid-template-columns:1.4fr 1fr;gap:56px}
  .jh-states.all li,.jh-states:not(.all) li:nth-child(n+7){display:flex}
  .jh-linkbtn{display:none}
  .jh-orgs{grid-template-columns:repeat(8,1fr)}
  .jh-two{grid-template-columns:1.4fr 1fr}
  .jh-res.split{display:grid;grid-template-columns:1fr 1fr;column-gap:48px}
  .jh-trust{grid-template-columns:1.2fr 1fr;gap:44px;align-items:start}
}
