/*
  home.css — homepage + listing cards (page-home / page-section)
  Sections: Layout → Breaking → Components/grid → Cards → Mobile → Section pages
            → Trending → Search overlay → Countdown → More menu → Pagination → Clean layout
*/
:root {
  --home-surface: var(--site-surface);
  --home-surface-alt: var(--surface-alt);
  --home-border-soft: var(--site-border);
  --home-shadow-sm: var(--site-shadow-sm);
  --home-shadow: var(--site-shadow);
  --home-shadow-hover: var(--site-shadow-hover);
  --home-radius-sm: var(--site-radius-sm);
  --home-radius: var(--site-radius);
  --home-primary: var(--site-primary);
  --home-primary-2: var(--site-primary-2);
  --home-select-bg: var(--ui-soft-bg);
  --home-select-bg-deep: var(--brand-blue);
  --home-select-text: var(--ui-soft-text);
  --home-select-border: var(--ui-soft-border);
  --home-breaking-bg: var(--ui-accent-bg);
  --home-breaking-text: var(--ui-accent-text);
  --home-breaking-border: var(--ui-accent-border);
  --home-gradient-primary: var(--gradient-primary);
  --home-gradient-accent: var(--gradient-accent);
  --home-link: var(--site-link);
  --home-link-hover: var(--site-link-hover);
  --home-success: var(--color-success);
  --home-warning: var(--color-warning);
  --home-danger: var(--color-danger);
  --home-info: var(--color-info);

  /* Small boxes — 2-line min-height (no truncation); pills use --home-pill-* below */
  --home-cat-2line-min-h: calc(2 * 1.3em + 22px);
  --home-cat-2line-min-h-mobile: calc(2 * 1.28em + 12px);
  --home-pill-2line-min-h: calc(2 * 1.25em + 20px);
  --home-pill-2line-min-h-mobile: calc(2 * 1.25em + 20px);

  /* Homepage rhythm — section gaps, grid gaps, card insets */
  --home-gap-section: var(--space-24);
  --home-gap-section-lg: 28px;
  --home-gap-grid: var(--space-12);
  --home-gap-grid-tight: var(--space-8);
  --home-gap-inline: var(--space-16);
  --home-card-inset-mobile: var(--space-12);
}

.visually-hidden-seo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.intro-section {
  margin: 0 0 var(--space-8);
}

.intro-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
  color: #666;
  padding: 0;
}

@media (max-width: 768px) {
  .intro-section {
    margin: 0 0 var(--space-4);
  }

  .intro-title {
    font-size: 14px;
    line-height: 1.1;
    font-weight: 400;
    color: #888;
    margin: 0;
    padding: 0;
  }
}

/* Body / .main-container — global rules in tokens.css */
.site-main .main-container {
    margin-top: var(--space-24);
    margin-bottom: var(--space-24);
  }
  
  @media (max-width: 768px) {
    .site-main .main-container {
      margin-top: 0;
      margin-bottom: 16px;
    }
  }
  
  /* Homepage: section blocks + flex gap (avoids doubled margins between sections) */
  body.page-home .site-main .main-container {
    margin-bottom: 0;
    padding-bottom: var(--space-24);
  }
  
  @media (min-width: 768px) {
    body.page-home .site-main .main-container {
      padding-bottom: var(--home-gap-section-lg);
    }
  }
  
  /* ---------- Homepage: uniform section spacing & column alignment ---------- */
  body.page-home .main-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--home-gap-section);
  }

  @media (min-width: 768px) {
    body.page-home .main-container {
      gap: var(--home-gap-section-lg);
    }
  }

  /*
   * Full-bleed alignment: all primary blocks share the same left/right axis.
   * Horizontal gutter comes from tokens.css .main-container only.
   */
  body.page-home .main-container > .section,
  body.page-home .main-container > #countdownBox {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Finder: alignment only — vertical padding comes from finder.css */
  body.page-home .main-container > #openFinder {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  body.page-home .main-container .breaking-news,
  body.page-home .main-container .small-boxes,
  body.page-home .main-container .cards-section,
  body.page-home .main-container .taxonomy-discovery,
  body.page-home .main-container .trending-section,
  body.page-home .main-container #about-site {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  body.page-home .main-container > .section .card-grid,
  body.page-home .card-grid {
    margin-top: 0;
  }
  
  
    /* ===== Breaking Container ===== */
  .breaking{
    display:flex;
    align-items:stretch;
    min-height:48px;
    background:#ffffff;
    overflow:hidden;
    border-radius:var(--home-radius-sm);
    border:1px solid #cbd5e1;
    box-shadow:none;
    font-family:system-ui;
  }

  /* ===== Left Label ===== */
  .breaking-left{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:6px;
    background:var(--home-breaking-bg);
    color:var(--home-breaking-text);
    border-right:1px solid var(--home-breaking-border);
    padding:0 18px;
    font-weight:700;
    font-size:11px;
    letter-spacing:0.06em;
    text-transform:uppercase;
    position:relative;
    z-index:var(--z-base);
  }

  .breaking-left::after{
    display:none;
  }

  .breaking-left__label{
    white-space:nowrap;
  }

  .breaking-left__icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    color:var(--home-breaking-text);
    font-size:12px;
    line-height:0;
    animation:pulse-once 0.9s ease 1;
  }

  .breaking-left__icon::before{
    display:block;
    line-height:1;
  }

  /* ===== Rotator Area ===== */
  .breaking-right{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    align-items:center;
    padding:6px 10px 6px 10px;
    overflow:hidden;
  }

  .breaking-rotator{
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    min-width:0;
  }

  .breaking-rotator__viewport{
    flex:1 1 auto;
    min-width:0;
    overflow:hidden;
  }

  .breaking-rotator__track{
    display:flex;
    width:100%;
    transition:transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change:transform;
  }

  .breaking-rotator__chip{
    flex:0 0 100%;
    min-width:0;
    display:flex;
    align-items:center;
    min-height:44px;
    padding:8px 12px;
    border-radius:10px;
    border:1px solid var(--home-border-soft);
    background:#fff;
    box-shadow:none;
    text-decoration:none;
    color:#1e293b;
    transition:background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
    box-sizing:border-box;
  }

  .breaking-rotator__chip-inner{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    width:100%;
  }

  .breaking-rotator__badges{
    flex:0 0 auto;
    display:inline-flex;
  }

  .breaking-rotator__title{
    flex:1 1 auto;
    min-width:0;
    font-size:14px;
    font-weight:600;
    line-height:1.3;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .breaking-rotator__chip:hover{
    color:var(--brand-navy);
    border-color:var(--ui-soft-border);
    background:var(--ui-soft-bg);
    box-shadow:none;
  }

  .breaking-rotator__chip:active{
    transform:scale(0.99);
    background:#f8fafc;
  }

  .breaking-rotator__controls{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:6px;
  }

  .breaking-rotator__controls--hidden{
    display:none;
  }

  .breaking-rotator__arrow{
    display:none;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    min-width:32px;
    min-height:32px;
    padding:0;
    border:1px solid #e2e8f0;
    border-radius:8px;
    background:#fff;
    color:#475569;
    cursor:pointer;
    transition:background-color 0.15s ease, border-color 0.15s ease;
  }

  .breaking-rotator__arrow:hover{
    background:var(--hover-bg-subtle);
    border-color:var(--hover-border);
    color:var(--hover-text-strong);
  }

  .breaking-rotator__dots{
    display:flex;
    align-items:center;
    gap:5px;
  }

  .breaking-rotator__dot{
    width:7px;
    height:7px;
    padding:0;
    border:none;
    border-radius:999px;
    background:#cbd5e1;
    cursor:pointer;
    transition:background-color 0.15s ease, transform 0.15s ease;
  }

  .breaking-rotator__dot.is-active{
    background:var(--home-select-bg-deep);
    transform:scale(1.15);
  }

  .breaking-rotator__dots-more{
    font-size:10px;
    font-weight:700;
    color:#64748b;
    margin-left:2px;
  }

  /* Unified badges inside breaking rotator */
  body.page-home .breaking-news .home-badge{
    display:inline-flex;
    align-items:center;
    font-size:10px;
    font-weight:700;
    line-height:1.2;
    letter-spacing:0.02em;
    text-transform:uppercase;
    padding:2px 7px;
    border-radius:999px;
    border:1px solid transparent;
    white-space:nowrap;
  }

  body.page-home .breaking-news .home-badge--new{
    color:color-mix(in srgb, var(--home-link) 90%, #475569);
    background:color-mix(in srgb, var(--home-link) 8%, #fff);
    border-color:color-mix(in srgb, var(--home-link) 22%, transparent);
  }

  body.page-home .breaking-news .home-badge--out{
    color:color-mix(in srgb, var(--home-primary-2) 92%, #475569);
    background:color-mix(in srgb, var(--home-link) 12%, #fff);
    border-color:color-mix(in srgb, var(--home-primary-2) 28%, transparent);
  }

  body.page-home .breaking-news .home-badge--start{
    color:color-mix(in srgb, var(--home-success) 72%, #14532d);
    background:color-mix(in srgb, var(--home-success) 7%, #fff);
    border-color:color-mix(in srgb, var(--home-link) 22%, transparent);
  }

  body.page-home .breaking-news .home-badge--soon{
    color:color-mix(in srgb, var(--home-warning) 78%, #78350f);
    background:color-mix(in srgb, var(--home-warning) 10%, #fff);
    border-color:color-mix(in srgb, var(--home-warning) 26%, transparent);
  }

  /* Reduced motion — static stacked list */
  .breaking-rotator--static{
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }

  .breaking-rotator__static-list{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-direction:column;
    gap:6px;
    width:100%;
  }

  .breaking-rotator__static-list .breaking-rotator__chip{
    flex:1 1 auto;
    width:100%;
  }

  .breaking-rotator--single .breaking-rotator__chip{
    margin:0 auto;
    max-width:100%;
  }

  /* ===== Breaking icon (one pulse on load) ===== */

  @keyframes pulse-once{
    0%,100%{transform:scale(1)}
    50%{transform:scale(1.12)}
  }

  @media (min-width:769px){
    .breaking{
      min-height:52px;
    }

    .breaking-left{
      padding:0 20px;
      font-size:12px;
    }

    .breaking-left__icon{
      font-size:12px;
    }

    .breaking-right{
      padding:6px 12px 6px 12px;
    }

    .breaking-rotator__title{
      font-size:15px;
    }

    .breaking-rotator__arrow{
      display:inline-flex;
    }
  }
  
  /* ---------- Components: category grid ---------- */
    /* 🎯 Categories Grid — desktop 4×2 (8 slots), mobile 3×2 (slots 1–6) */
    .small-boxes{
      display:grid;
      grid-template-columns:repeat(4,1fr);
      max-width:100%;
      margin:0;
      gap:var(--home-gap-grid);
      align-items:stretch;
    }
    
    /* CARD — scoped to Small Info Boxes only */
    .small-boxes .cat{
      display:-webkit-box;
      -webkit-box-orient:vertical;
      -webkit-line-clamp:2;
      overflow:hidden;
      align-items:center;
      justify-content:center;
      min-height:var(--home-cat-2line-min-h);
      height:100%;
      width:100%;
      padding:11px 10px 11px 14px;
      border-radius:var(--home-radius-sm);

      font-family:var(--site-font);
      font-weight:700;
      font-size:13px;
      line-height:1.3;
      letter-spacing:-0.02em;

      text-align:center;
      cursor:pointer;
      text-decoration:none;

      box-shadow:none;
      box-sizing:border-box;
      position:relative;
      transform:none;
      overflow-wrap:break-word;
      word-break:normal;
      hyphens:none;

      transition:
        background-color var(--duration-fast) var(--ease-out),
        border-color var(--duration-base) var(--ease-out),
        color var(--duration-base) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
    }

    .small-box a:any-link,
    .small-boxes a:any-link{
      text-decoration:none;
    }

    .small-box a:hover,
    .small-boxes a:hover,
    .small-box a:focus,
    .small-boxes a:focus,
    .small-box a:focus-visible,
    .small-boxes a:focus-visible{
      text-decoration:none;
    }

    .small-boxes .cat::before{
      content:"";
      position:absolute;
      left:0;
      top:0;
      bottom:0;
      width:4px;
      border-top-left-radius:var(--home-radius-sm);
      border-bottom-left-radius:var(--home-radius-sm);
      pointer-events:none;
    }

    /* Blue — jobs / SSC style */
    .small-boxes .cat.blue{
      color:var(--brand-navy, #1e3c72);
      background:#eff6ff;
      border:1px solid #bfdbfe;
    }
    .small-boxes .cat.blue::before{background:#2563eb;}
    .small-boxes .cat.blue:hover,
    .small-boxes .cat.blue:focus-visible{
      color:var(--brand-navy-dark, #1a3470);
      background:#dbeafe;
      border-color:#93c5fd;
    }
    .small-boxes .cat.blue:active{
      color:var(--brand-navy-dark, #1a3470);
      background:#bfdbfe;
      border-color:#60a5fa;
    }

    /* Green — results / success */
    .small-boxes .cat.green{
      color:#166534;
      background:#f0fdf4;
      border:1px solid #bbf7d0;
    }
    .small-boxes .cat.green::before{background:#16a34a;}
    .small-boxes .cat.green:hover,
    .small-boxes .cat.green:focus-visible{
      color:#14532d;
      background:#dcfce7;
      border-color:#86efac;
    }
    .small-boxes .cat.green:active{
      color:#14532d;
      background:#bbf7d0;
      border-color:#4ade80;
    }

    /* Orange — admit / urgent */
    .small-boxes .cat.orange,
    .small-boxes .cat.red{
      color:#9a3412;
      background:#fff7ed;
      border:1px solid #fed7aa;
    }
    .small-boxes .cat.orange::before,
    .small-boxes .cat.red::before{background:#ea580c;}
    .small-boxes .cat.orange:hover,
    .small-boxes .cat.orange:focus-visible,
    .small-boxes .cat.red:hover,
    .small-boxes .cat.red:focus-visible{
      color:#7c2d12;
      background:#ffedd5;
      border-color:#fdba74;
    }
    .small-boxes .cat.orange:active,
    .small-boxes .cat.red:active{
      color:#7c2d12;
      background:#fed7aa;
      border-color:#fb923c;
    }

    /* Purple — syllabus / special */
    .small-boxes .cat.purple{
      color:#6b21a8;
      background:#faf5ff;
      border:1px solid #e9d5ff;
    }
    .small-boxes .cat.purple::before{background:#7c3aed;}
    .small-boxes .cat.purple:hover,
    .small-boxes .cat.purple:focus-visible{
      color:#581c87;
      background:#f3e8ff;
      border-color:#d8b4fe;
    }
    .small-boxes .cat.purple:active{
      color:#581c87;
      background:#e9d5ff;
      border-color:#c084fc;
    }

    /*
     * Row 2 muted — desktop 4×2: slots 5–8.
     * Mobile uses slots 4–6 (see @media max-width 768px below).
     */
    @media (min-width: 769px) {
      .small-boxes .cat[data-small-box-slot="5"],
      .small-boxes .cat[data-small-box-slot="6"],
      .small-boxes .cat[data-small-box-slot="7"],
      .small-boxes .cat[data-small-box-slot="8"]{
        color:var(--site-primary, #1e3c72);
        background:var(--ui-soft-bg, #f0f4fa);
        border-color:var(--ui-soft-border, #c5d4eb);
        font-weight:600;
        font-size:12.5px;
        line-height:1.28;
        letter-spacing:-0.015em;
      }

      .small-boxes .cat[data-small-box-slot="5"]::before{background:#60a5fa;}
      .small-boxes .cat[data-small-box-slot="6"]::before{background:#4ade80;}
      .small-boxes .cat[data-small-box-slot="7"]::before{background:#fb923c;}
      .small-boxes .cat[data-small-box-slot="8"]::before{background:#a78bfa;}

      .small-boxes .cat[data-small-box-slot="5"]:hover,
      .small-boxes .cat[data-small-box-slot="6"]:hover,
      .small-boxes .cat[data-small-box-slot="7"]:hover,
      .small-boxes .cat[data-small-box-slot="8"]:hover,
      .small-boxes .cat[data-small-box-slot="5"]:focus-visible,
      .small-boxes .cat[data-small-box-slot="6"]:focus-visible,
      .small-boxes .cat[data-small-box-slot="7"]:focus-visible,
      .small-boxes .cat[data-small-box-slot="8"]:focus-visible{
        color:var(--brand-navy, #1e3c72);
        background:var(--ui-soft-bg-hover, #e4ebf5);
        border-color:var(--ui-control-border-hover, #94a3b8);
      }

      .small-boxes .cat[data-small-box-slot="5"]:active,
      .small-boxes .cat[data-small-box-slot="6"]:active,
      .small-boxes .cat[data-small-box-slot="7"]:active,
      .small-boxes .cat[data-small-box-slot="8"]:active{
        color:var(--brand-navy, #1e3c72);
        background:var(--ui-soft-bg-hover, #e4ebf5);
        border-color:var(--ui-control-border-hover, #94a3b8);
      }
    }

    /* HOVER — shared motion only */
    .small-boxes .cat:hover{
      transform:none;
      box-shadow:none;
      filter:none;
      text-decoration:none;
    }

    /* CLICK */
    .small-boxes .cat:active{
      transform:scale(0.98);
      box-shadow:none;
    }

    .small-boxes .cat:focus-visible{
      outline:2px solid var(--brand-blue, #2563eb);
      outline-offset:2px;
    }
    
   /* ================= CARDS (grid scoped: .page-home | .page-section via header.js) ================= */
  
  .page-home .card-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:var(--home-gap-grid);
    margin-top:0;
  }

  /* Homepage dynamic sections: thin borders as separators */
  body.page-home #dynamicSections.card-grid{
    display:grid;
    column-gap:0;
    row-gap:0;
    gap:0;
    margin-top:4px;
    padding-top:var(--home-gap-section);
    border-top:1px solid #e2e8f0;
  }

  body.page-home #dynamicSections > .card{
    border:1px solid #e6eaf0;
    box-sizing:border-box;
    background:#ffffff;
    box-shadow:none;
    order:var(--home-order-mobile, 99);
  }

  body.page-home #dynamicSections .ribbon .title{
    text-shadow:none;
  }

  body.page-home #dynamicSections .blue-ribbon{background:#2a47a0;}
  body.page-home #dynamicSections .navy-ribbon{background:#1e3a8a;}
  body.page-home #dynamicSections .green-ribbon{background:#065f46;}
  body.page-home #dynamicSections .darkblue-ribbon{background:#1e40af;}
  body.page-home #dynamicSections .purple-ribbon{background:#7c3aed;}
  body.page-home #dynamicSections .orange-ribbon{background:#ea580c;}

  body.page-home #dynamicSections .mini-badge{
    background:var(--home-warning);
    box-shadow:none;
    text-shadow:none;
  }

  body.page-home #dynamicSections .tag.new{background:var(--home-success);}
  body.page-home #dynamicSections .tag.out{background:#2563eb;}
  body.page-home #dynamicSections .tag.declared{background:var(--home-danger);}
  body.page-home #dynamicSections .tag.coming{background:#ea580c;}
  body.page-home #dynamicSections .tag.admission{background:#7c3aed;}
  
  @media (min-width:768px){
    .page-home .card-grid{
      grid-template-columns:repeat(3,1fr);
    }

    body.page-home #dynamicSections.card-grid{
      column-gap:8px;
      row-gap:var(--home-gap-grid-tight);
    }

    body.page-home #dynamicSections > .card{
      order:var(--home-order-desktop, 99);
    }
  }
  
  .page-section .card-grid{
    display:grid;
    grid-template-columns:repeat(1,1fr);
    gap:12px;
    margin-top:20px;
  }
  
  /* Section listing pages: match centered column (see tokens.css .main-container) */
  .page-section .main-container{
    width:100%;
    padding:0 12px;
    box-sizing:border-box;
  }
  
  @media (min-width: 1025px) {
    .page-section .main-container {
      width: var(--layout-desktop-width, 80%);
      max-width: var(--layout-desktop-max, 1200px);
      margin-left: auto;
      margin-right: auto;
    }
  }

  @media (min-width: 769px) and (max-width: 1024px) {
    .page-section .main-container {
      width: var(--layout-tablet-width, 96%);
      max-width: var(--layout-tablet-max, 100%);
      margin-left: auto;
      margin-right: auto;
    }
  }
  
  .card-grid > .card{
    width:100%;
    min-width:0;
  }
  
  /* Card */
  .card{
    position:relative;
    border-radius:18px;
    background:linear-gradient(145deg,var(--home-surface-alt),var(--home-surface));
    
    padding: 50px 18px 26px;
    box-shadow:
    0 8px 25px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
  
    transition:transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
    overflow:hidden;
  }

  .page-section .card{
    background:var(--home-surface);
    box-shadow:none;
    border:1px solid #e6eaf0;
  }
  
  
  
  /* Ribbon */
  .ribbon{
    position:absolute;
    top:0;
    left:0;
    padding:14px 26px 14px 18px;
    border-top-left-radius:18px;
    border-bottom-right-radius:36px;
    display:flex;
    align-items:center;
  }
  
  /* Title */
  .ribbon .title{
    color:var(--site-text-inverse);
    font-size:21px;
    font-weight:700;
    letter-spacing:.8px;
  
    text-shadow:
    1px 1px 0 #1a1a1a,
    2px 2px 4px rgba(0,0,0,0.4);
  }

  /* "Latest Jobs" → mini-badge + JOBS (same ribbon row) */
  .ribbon.form-ribbon{
    gap:10px;
  }
  .ribbon .mini-badge{
    margin-right:0;
    flex-shrink:0;
  }
  
  /* Ribbon Colors */
  .blue-ribbon{background:linear-gradient(90deg,#243b8f,#2f55d4);}
  .navy-ribbon{background:linear-gradient(90deg,#0f172a,#1e3a8a);}
  .green-ribbon{background:linear-gradient(90deg,#065f46,var(--home-success));}
    .darkblue-ribbon{background:linear-gradient(90deg,#1e40af,var(--color-info));}
  .purple-ribbon{background:linear-gradient(90deg,#6b21a8,#9333ea);}
  .orange-ribbon{background:linear-gradient(90deg,var(--home-warning),#f97316);}
  
  /* Card Content */
  .card-content{
    margin-top:32px;
  }
  
  /* Job List */
  .job-list{
    list-style:none;
    padding:0;
    margin:0;
  }
  
  .job-list li{
    display:flex;
    align-items:center;
  
    padding:10px 0;
  
    font-size:15px;
    font-weight:600;
  
    border-bottom:1px solid #e6eaf0;
  }
  
  .job-list li:last-child{
    border-bottom:none;
  }
  
  /* Bullet */
  .job-list li::before{
    content:"";
    width:8px;
    height:8px;
    border-radius:50%;
  
    margin-right:10px;
    display:inline-block;
  
    background:var(--site-link);
  }
  
  /* Links */
  .job-list a{
    text-decoration:none;
    color:var(--site-link);
    flex:1;
    min-width:0;
    font-size:17px;
    text-transform: capitalize;
    transition:.25s;
  }
  
  .job-list a:hover{
    color:var(--hover-text);
    text-decoration:underline;
    text-decoration-color:rgba(37,99,235,0.35);
    text-underline-offset:3px;
  }

  /* Homepage card rows (#dynamicSections): title – BADGE hierarchy */
  body.page-home #dynamicSections .card-content{
    margin-top:20px;
  }

  body.page-home #dynamicSections .job-list{
    width:100%;
  }

  body.page-home #dynamicSections .job-list li{
    width:100%;
    align-items:stretch;
    box-sizing:border-box;
  }

  body.page-home #dynamicSections .job-list li::before{
    width:6px;
    height:6px;
    margin-right:6px;
    background:#94a3b8;
    opacity:0.88;
    flex-shrink:0;
    align-self:center;
  }

  body.page-home #dynamicSections .job-list a{
    display:block;
    flex:1 1 0%;
    min-width:0;
    width:0;
    box-sizing:border-box;
  }

  body.page-home #dynamicSections .home-card-badge-group{
    display:inline;
    white-space:nowrap;
    margin-left:0;
    vertical-align:baseline;
  }

  body.page-home #dynamicSections .home-card-badge-sep{
    color:#9ca3af;
    margin:0;
    padding:0;
    font-weight:400;
    text-decoration:none;
  }

  body.page-home #dynamicSections .job-list a:hover .home-card-badge-sep{
    color:#9ca3af;
    text-decoration:none;
  }

  body.page-home #dynamicSections .home-badge{
    display:inline-flex;
    align-items:center;
    vertical-align:baseline;
    font-size:10px;
    font-weight:600;
    line-height:1.2;
    letter-spacing:0.02em;
    text-transform:uppercase;
    padding:2px 7px;
    border-radius:999px;
    border:1px solid transparent;
    white-space:nowrap;
    margin-left:0;
    box-shadow:none;
  }

  body.page-home #dynamicSections .home-card-badge-group .home-badge + .home-badge{
    margin-left:3px;
  }

  body.page-home #dynamicSections .home-badge--new{
    color:#1d4ed8;
    background:#eff6ff;
    border-color:#bfdbfe;
  }

  body.page-home #dynamicSections .home-badge--out{
    color:#1e3c72;
    background:#f0f4fa;
    border-color:#c5d4eb;
  }

  body.page-home #dynamicSections .home-badge--start{
    color:#166534;
    background:#f0fdf4;
    border-color:#bbf7d0;
  }

  body.page-home #dynamicSections .home-badge--soon{
    color:#9a3412;
    background:#fff7ed;
    border-color:#fed7aa;
  }

  body.page-home #dynamicSections .job-list a:hover .home-badge{
    text-decoration:none;
  }

  .tag{
    display:inline-block;
    font-size:10px;
    font-weight:700;
    padding:3px 7px;
    margin-left:6px;
    border-radius:999px;
    color:#fff;
    text-transform:uppercase;
  }
  
  .tag.new{
    background:linear-gradient(135deg,var(--home-success),#009624);
  }
  
  .tag.out{
    background:linear-gradient(135deg,#2979ff,#1565c0);
  }
  
  .tag.declared{
    background:linear-gradient(135deg,var(--home-danger),#9b0000);
  }
  .tag.coming {
    background: linear-gradient(135deg,var(--home-warning),#ff6f00);
    color: var(--site-text-inverse);
  
    animation: pulseComing 1.2s ease-in-out infinite;
  }
  .tag.admission{
    background:linear-gradient(135deg,#7d3be7,#3010e4);
  }
  
  
  
  @keyframes pulseComing {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  .tag.live {
    background: red;
    color: var(--site-text-inverse);
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: 700;
  
    animation: liveBlink 0.8s infinite;
  }
  
  @keyframes liveBlink {
     0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  
   /* Mini Badge */
  .mini-badge{
    background:linear-gradient(145deg,#ffb347,var(--home-warning));
    color:var(--site-text-inverse);
  
    font-size:11px;
    font-weight:600;
  
    padding:4px 8px;
    border-radius:20px;
  
    margin-right:10px;
  
    box-shadow:
    0 2px 0 rgba(0,0,0,0.2),
    0 4px 8px rgba(0,0,0,0.2);
  
    text-shadow:0 1px 2px rgba(0,0,0,0.4);
  }
  
      
  /* ✅ MOBILE FIRST IMPROVEMENTS */
  
    
  @media (max-width:768px){
  
   .breaking-left{
      padding:0 14px;
      font-size:10px;
    }
    .breaking-right{
      padding:6px 8px 6px 10px;
    }
  
    .search-overlay .search-box{
      height:40px;
    }
  
    .search-overlay .search-icon{
      font-size:16px;
      margin-left:12px;
      margin-right:8px;
    }
  
    .search-overlay .search-box input{
      font-size:15px;
      padding:0 10px;
    }
  
    .search-overlay .search-box button{
      padding:6px 16px;
      font-size:15px;
    }
  
    /* Categories — mobile: 3×2 grid; slots 7–8 hidden (desktop only) */
    .small-boxes{
      grid-template-columns:repeat(3,1fr);
      gap:6px;
    }

    .small-boxes .cat[data-small-box-slot="7"],
    .small-boxes .cat[data-small-box-slot="8"]{
      display:none;
    }

    /* Row 2 muted — mobile 3×2: slots 4–6 (visual second row) */
    body.page-home .small-boxes .cat[data-small-box-slot="4"],
    body.page-home .small-boxes .cat[data-small-box-slot="5"],
    body.page-home .small-boxes .cat[data-small-box-slot="6"]{
      color:var(--site-primary, #1e3c72);
      background:var(--ui-soft-bg, #f0f4fa);
      border-color:var(--ui-soft-border, #c5d4eb);
      font-weight:600;
      font-size:11px;
      letter-spacing:-0.015em;
    }

    body.page-home .small-boxes .cat[data-small-box-slot="4"]::before{background:#a78bfa;}
    body.page-home .small-boxes .cat[data-small-box-slot="5"]::before{background:#60a5fa;}
    body.page-home .small-boxes .cat[data-small-box-slot="6"]::before{background:#4ade80;}

    body.page-home .small-boxes .cat[data-small-box-slot="4"]:hover,
    body.page-home .small-boxes .cat[data-small-box-slot="5"]:hover,
    body.page-home .small-boxes .cat[data-small-box-slot="6"]:hover,
    body.page-home .small-boxes .cat[data-small-box-slot="4"]:focus-visible,
    body.page-home .small-boxes .cat[data-small-box-slot="5"]:focus-visible,
    body.page-home .small-boxes .cat[data-small-box-slot="6"]:focus-visible{
      color:var(--brand-navy, #1e3c72);
      background:var(--ui-soft-bg-hover, #e4ebf5);
      border-color:var(--ui-control-border-hover, #94a3b8);
    }

    body.page-home .small-boxes .cat[data-small-box-slot="4"]:active,
    body.page-home .small-boxes .cat[data-small-box-slot="5"]:active,
    body.page-home .small-boxes .cat[data-small-box-slot="6"]:active{
      color:var(--brand-navy, #1e3c72);
      background:var(--ui-soft-bg-hover, #e4ebf5);
      border-color:var(--ui-control-border-hover, #94a3b8);
    }

    body.page-home .small-boxes .cat[data-small-box-slot="1"],
    body.page-home .small-boxes .cat[data-small-box-slot="2"],
    body.page-home .small-boxes .cat[data-small-box-slot="3"]{
      padding:8px 6px 8px 10px;
      font-size:12px;
      font-weight:700;
      line-height:1.28;
      letter-spacing:-0.02em;
      min-height:var(--home-cat-2line-min-h-mobile);
    }

    .small-boxes .cat{
      padding:8px 6px 8px 10px;
      font-size:12px;
      font-weight:700;
      line-height:1.28;
      letter-spacing:-0.02em;
      border-radius:8px;
      min-height:var(--home-cat-2line-min-h-mobile);
      overflow-wrap:break-word;
      word-break:normal;
      hyphens:none;
    }

    .small-boxes .cat::before{
      width:3px;
      border-top-left-radius:8px;
      border-bottom-left-radius:8px;
    }
  
    .card{
      padding:20px 5px 26px;
      border-radius: 10px 10px 10px 10px;
    }

    body.page-home .card{
      padding:20px var(--home-card-inset-mobile) 26px;
    }
    .ribbon{
      padding: 10px 18px;
       border-top-left-radius:1px;
    }
  
    .ribbon .title{
      font-size:16px;
    }
  
    .job-list a{
    font-size: 14px;
    
  
    }
  
    .job-list li{
      font-size:12px;
      padding:8px 0;
    }

    body.page-home .job-list li{
      padding:6px 0;
    }
    
  
   .job-list li::before{
    content:"";
    width:4px;
    height:4px;
    border-radius:50%;
    margin-right:5px;
    display:inline-block;
  }
  
    .tag{
      font-size:8px;
      padding:2px 4px;
    }

    body.page-home #dynamicSections .card-content{
      margin-top:24px;
    }

    body.page-home #dynamicSections > .card{
      padding-left:4px;
      padding-right:4px;
      background:#ffffff;
      box-shadow:none;
    }

    body.page-home #dynamicSections .job-list li{
      padding:5px 0;
      min-height:0;
    }

    body.page-home #dynamicSections .job-list a{
      align-self:stretch;
      padding:0;
      font-size:12px;
      font-weight:700;
      line-height:1.3;
      letter-spacing:-0.02em;
    }

    body.page-home #dynamicSections .job-list li::before{
      width:3px;
      height:3px;
      margin-right:3px;
      background:#94a3b8;
      opacity:0.88;
    }

    body.page-home #dynamicSections .home-card-badge-sep{
      margin:0;
      padding:0;
    }

    body.page-home #dynamicSections .home-badge{
      font-size:8px;
      padding:1px 4px;
    }

    body.page-home #dynamicSections .home-card-badge-group .home-badge + .home-badge{
      margin-left:3px;
    }

    body.page-home .trending-list li::before{
      width:3px;
      height:3px;
      margin-right:6px;
    }

    body.page-home .trending-list a{
      font-size:14px;
    }

    .tag.live {
    padding: 2px 4px;
    font-size: 8px;
  
  }
  
    body.page-home #dynamicSections .mini-badge{
      font-size:12px;
      padding:2px 6px;
      margin-right:5px;
      border-radius:20px;
      color:var(--site-text-inverse);
      font-weight:600;
      background:var(--home-warning);
      box-shadow:none;
      text-shadow:none;
    }
   
  }
     
  /* SECTION PAGE LAYOUT */
  
  .page-section .cards.single-card,
  .page-section .card-grid.single-card{
    grid-template-columns:1fr !important;
    max-width:700px;
    margin-left:auto;
    margin-right:auto;
  }
  
  .section-title{
    font-size:28px;
    font-weight:700;
    margin:20px 0 15px;
    color:var(--site-primary);
    text-align:center;
  }

  body.page-home .trending-section .section-title{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    margin:0 0 var(--home-gap-grid);
    padding-bottom:12px;
    border-bottom:1px solid #e8edf4;
    font-size:clamp(1.15rem, 2.4vw, 1.45rem);
    font-weight:800;
    letter-spacing:-0.02em;
    text-align:left;
    color:var(--home-primary);
  }

  body.page-home .trending-section .section-title::before{
    content:"";
    width:4px;
    height:1.15em;
    border-radius:999px;
    background:#ea580c;
    flex-shrink:0;
  }

  /* 🔥 Trending Jobs */
  body.page-home .trending-section{
    box-sizing:border-box;
    margin:0;
    padding:18px 16px 16px;
    border:1px solid #e8edf4;
    border-radius:var(--home-radius-sm);
    background:#fff;
    box-shadow:none;
  }

  body.page-home #about-site .sarkari-about{
    box-shadow:none;
    border-radius:0;
    padding:var(--home-gap-section) 0 0;
    border-top:1px solid #e8edf4;
  }
  
   
  
  
  .trending-section{
    width:100%;
    max-width:100%;
    margin:0 auto;
    background:var(--surface);
    padding:18px 20px;
    border-radius:12px;
    border:1px solid #e8edf4;
    box-shadow:none;
    box-sizing:border-box;
  }

  .trending-list{
  list-style:none;
  padding:0;
  margin:var(--space-8) 0 0;
  counter-reset:trending-rank;
  }

  body.page-home .trending-list{
    margin:0;
  }

  /* Homepage: ranked trending rows */
  body.page-home .trending-list li{
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 10px;
    margin:0 -10px;
    border-bottom:1px solid #eef2f7;
    font-weight:600;
    border-radius:10px;
    counter-increment:trending-rank;
    transition:background-color .2s ease, transform .2s ease;
  }

  body.page-home .trending-list li:hover{
    background:#f8fafc;
  }

  body.page-home .trending-list li::before{
    content:counter(trending-rank);
    width:28px;
    height:28px;
    min-width:28px;
    border-radius:8px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:800;
    line-height:1;
    color:#9a3412;
    background:#ffedd5;
    border:1px solid #fed7aa;
    flex-shrink:0;
  }

  body.page-home .trending-list li:nth-child(-n+3)::before{
    color:#fff;
    border-color:transparent;
    background:#ea580c;
    box-shadow:none;
  }

  body.page-home .trending-list a{
    flex:1;
    min-width:0;
    font-size:16px;
    font-weight:600;
    line-height:1.35;
    transition:color .2s ease;
  }

  body.page-home .trending-list li:last-child{
    border-bottom:none;
  }
  
  .trending-list li{
  padding:10px 0;
  border-bottom:1px solid #eee;
  font-size:16px;
  font-weight:600;
  }
  
  .trending-list li:last-child{
  border-bottom:none;
  }
  
  .trending-list a{
  text-decoration:none;
  color:var(--site-link);
  }
  
  .trending-list a:hover{
  color:var(--hover-text);
  text-decoration:underline;
  text-decoration-color:rgba(37,99,235,0.35);
  text-underline-offset:3px;
  }

  body.page-home .trending-view-more{
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid #eef2f7;
    text-align:center;
  }

  body.page-home .trending-view-more .view-more{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:40px;
    padding:8px 16px;
    border-radius:10px;
    font-size:14px;
    font-weight:700;
    text-decoration:none;
    color:#9a3412;
    background:#fff7ed;
    border:1px solid #fed7aa;
    transition:background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  }

  body.page-home .trending-view-more .view-more::after{
    content:"→";
    font-size:15px;
    line-height:1;
    transition:transform .2s ease;
  }

  body.page-home .trending-view-more .view-more:hover{
    background:#ffedd5;
    border-color:#fdba74;
    color:#c2410c;
    transform:none;
  }

  body.page-home .trending-view-more .view-more:hover::after{
    transform:translateX(3px);
  }

  @media (max-width: 768px) {
    body.page-home .trending-section{
      padding:14px 12px 12px;
    }

    body.page-home .trending-list li{
      padding:10px 6px;
      margin:0 -6px;
    }

    body.page-home .trending-list a{
      font-size:15px;
    }

    body.page-home .trending-list li::before{
      width:26px;
      height:26px;
      min-width:26px;
      font-size:11px;
    }
  }
  
  
  
  /* ---------- Search: overlay, box, suggestions ---------- */
  .search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 100px 15px 20px;
    z-index: var(--z-overlay);
    background: #f8fafc;
  }
  
  .search-overlay.active {
    display: flex;
  }
  
  .close-search {
    position: fixed;
    top: 15px;
    right: calc(25px + env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #334155;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: none;
    z-index: var(--z-toast);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  }
  .close-search:hover {
    color: #1e3a8a;
    border-color: #93c5fd;
    transform: rotate(90deg);
  }
  
  .search-overlay .search-box {
    width: 100%;
    max-width: 600px;
    height: 52px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-shadow: none;
    transition: transform 0.25s ease, opacity 0.25s ease, border-color 0.2s ease;
    transform: translateY(-24px);
    opacity: 0;
  }
  
  .search-overlay.active .search-box {
    transform: translateY(0);
    opacity: 1;
  }
  
  .search-overlay .search-box:focus-within {
    border-color: #2563eb;
    box-shadow: none;
    outline: 2px solid rgba(37, 99, 235, 0.2);
    outline-offset: 0;
  }
  
  .search-overlay .search-box input {
    flex: 1;
    font-size: 16px;
    color: #0f172a;
    background: transparent;
    border: none;
    padding: 0 12px;
    outline: none;
  }
  
  .search-overlay .search-icon {
    color: #2563eb;
    font-size: 18px;
    margin-left: 14px;
  }
  
  .search-overlay .search-box button {
    padding: 0 20px;
    height: 100%;
    border: none;
    border-left: 1px solid var(--home-select-border);
    background: var(--home-select-bg);
    color: var(--home-select-text);
    border-radius: 0 11px 11px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
  }
  
  .search-suggestions,
  .recent-searches {
    position: absolute;
    top: 168px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    z-index: var(--z-overlay);
  }
  
  .search-suggestions {
    max-height: 250px;
    overflow-y: auto;
  }
  
  .search-suggestions a,
  .recent-item {
    display: block;
    padding: 12px 14px;
    font-size: 15px;
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  
  .search-suggestions a:hover,
  .recent-item-wrap:hover {
    background: #eff6ff;
    color: #1d4ed8;
  }
  
  .recent-item {
    color: #0f172a;
  }
  
  /* =========================
     RECENT HEADER
  ========================= */
  
  .recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
  }
  
  .recent-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a8a;
  }
  
  .recent-clear {
    font-size: 13px;
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
  }
  
  /* item */
  
  .recent-item-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  
    padding: 10px 12px;
    border-bottom: 1px solid #f1f2f6;
  }
  
  /* icon */
  
  .recent-icon {
    font-size: 14px;
    color: #8fa2d6;
  }
  
  /* delete */
  
  .recent-delete {
    background: none;
    border: none;
  
    font-size: 17px;
    color: #9aa3b5;
  
    cursor: pointer;
  }
  
  .recent-delete:hover {
    color: #ff4d4f;
  }
  
 /* ---------- ROOT VARIABLES ---------- */
 :root {
  --cd-bg: #1e3c72;
  --cd-text: var(--site-text-inverse);
  --cd-accent: #ffd54f;
  --cd-warning: #ff9800;
  --cd-live: #ff3b3b;

  --cd-radius: 16px;
  --cd-shadow: none;
  --cd-shadow-hover: none;
}

/* ---------- MAIN BOX ---------- */
.countdown-box {
  /* Keep hidden by default; JS shows only for valid future eventTime. */
  display: none;
  align-items: center;
  gap: var(--home-gap-inline);

  margin: 0;

  padding: var(--space-24) var(--home-gap-inline);
  min-height: 90px;

  width: 100%;
  max-width: 100%;

  border-radius: var(--cd-radius);
  background: var(--cd-bg);
  color: var(--cd-text);

  box-shadow: var(--cd-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ---------- HOVER ---------- */
@media (hover:hover){
  .countdown-box:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ---------- ICON ---------- */
.countdown-icon {
  font-size: 28px;
  flex-shrink: 0;
}

/* ---------- TEXT ---------- */
.countdown-text {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
}

/* Highlight */
.countdown-text span {
  color: var(--cd-accent);
  font-weight: 700;
}

/* ---------- TIMER ---------- */
.countdown-timer {
  font-size: 22px;
  font-weight: 700;
  color: var(--cd-accent);
  min-width: 110px;
  text-align: right;
}

/* Multi rows */
#countdownTimer div {
  line-height: 1.6;   /* 🔥 more height */
}

/* ---------- ROW ---------- */
.cd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;

  font-size: 15px;
  padding: 3px 0;   /* 🔥 row spacing */
}

/* Title inside row */
.cd-name {
  color: var(--cd-text);
  font-weight: 500;
  flex: 1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- STATES ---------- */

/* Warning */
.countdown-timer .warning {
  color: var(--cd-warning);
}

/* LIVE blinking */
.countdown-timer .live {
  color: var(--cd-live);
  font-weight: 700;
  animation: blink 1s infinite;
}

/* Blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- 📱 MOBILE ---------- */
@media (max-width: 480px) {

  .countdown-box {
    padding: 10px 10px;   /* 🔥 increased */
    min-height: 65px;
    gap: 10px;
  }

  .countdown-icon {
    font-size: 20px;
  }

  .countdown-text {
    font-size: 15px;
  }

  .countdown-timer {
    font-size: 18px;
    min-width: 90px;
  }

  .cd-row {
    font-size: 14px;
    padding: 4px 0;
  }
}

/* ---------- 💻 TABLET ---------- */
@media (min-width: 480px) and (max-width: 768px) {

  .countdown-box {
    padding: 20px 20px;
    min-height: 70px;
  }

  .countdown-text {
    font-size: 16px;
  }

  .countdown-timer {
    font-size: 20px;
  }
}

/* ---------- 💻 DESKTOP ---------- */
@media (min-width: 1024px) {

  .countdown-box {
    padding: 20px 20px;   /* 🔥 BIG HEIGHT */
    min-height: 80px;    /* 🔥 premium */
    border-radius: 18px;
  }

  .countdown-icon {
    font-size: 32px;
  }

  .countdown-text {
    font-size: 20px;
    line-height: 1.7;
  }

  .countdown-timer {
    font-size: 38px;
  }

  .cd-row {
    font-size: 18px;
    padding: 5px 0;
  }
}
  
  
 
  
  /* ---------- Desktop: more menu ---------- */
  
  .more-menu-desktop {
    position: absolute;
    top: 60px;
    right: 20px;

    background: var(--surface);
    border-radius: 10px;
    border: 1px solid #e2e8f0;

    box-shadow: none;
  
    width: 220px;
  
    display: none;
    flex-direction: column;
  
    padding: 8px 0;
  
    z-index: var(--z-overlay);
  }
  
  /* active */
  .more-menu-desktop.active {
    display: flex;
  }
  
  /* items */
  .more-menu-desktop a {
    display: flex;
    align-items: center;
    gap: 10px;
  
    padding: 10px 15px;
  
    text-decoration: none;
    font-size: 14px;
  
    color: #333;
  
    transition: 0.2s;
  }
  
  /* icon */
  .more-menu-desktop a i {
    color: var(--site-primary-2);
  }
  
  /* hover */
  .more-menu-desktop a:hover {
    background: #f0f4ff;
    color: var(--site-primary-2);
  }
  
  /*pagination==*/
  .pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:15px;
    margin:20px 0;
  }
  
  .page-btn{
    padding:8px 14px;
    background:#2563eb;
    color:var(--site-text-inverse);
    border:1px solid #1d4ed8;
    border-radius:6px;
    text-decoration:none;
  }
  
  .page-btn:hover{
    background:#1d4ed8;
    box-shadow:none;
  }
  
  .page-info{
    font-weight:600;
  }
  
  /* ============================= */
  /* CLEAN LAYOUT */
  /* ============================= */
  
  body.layout-clean .breaking,
  body.layout-clean .small-boxes,
  body.layout-clean #countdownBox,
  body.layout-clean #jobFinderModal,
  body.layout-clean #openFinder,
  body.layout-clean .trending-section,
  body.layout-clean #about-site {
    display: none !important;
  }
  
  /* optional: spacing adjust */
  body.layout-clean .main-container,
  body.layout-clean .page-container {
    width: 100%;
    max-width: 900px;
  }
  
  body.layout-clean.page-home .card-grid {
    grid-template-columns: 1fr !important;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
  
  body.layout-clean .card {
    border-radius: 12px;
  }
  
  /* Homepage — View more under each section card */
  .card-view-more{
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid #eef2f7;
    text-align:center;
  }

  .card-view-more .view-more{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-height:40px;
    padding:8px 14px;
    font-size:14px;
    font-weight:600;
    line-height:1.2;
    border-radius:8px;
    text-decoration:none;
    background:transparent;
    border:1px solid transparent;
    box-shadow:none;
    color:#1e40af;
    transition:color .2s ease, background-color .2s ease;
  }

  .view-more__arrow{
    font-size:15px;
    line-height:1;
    transition:transform .2s ease;
  }

  .card-view-more .view-more:hover{
    transform:none;
  }

  .card-view-more .view-more:hover .view-more__arrow{
    transform:translateX(3px);
  }

  .view-more--navy{ color:#1e3a8a; }
  .view-more--navy:hover{ background:#eff6ff; }

  .view-more--green{ color:#065f46; }
  .view-more--green:hover{ background:#ecfdf5; }

  .view-more--orange{ color:#9a3412; }
  .view-more--orange:hover{ background:#fff7ed; }

  .view-more--purple{ color:#5b21b6; }
  .view-more--purple:hover{ background:#f5f3ff; }

  .view-more--blue{ color:#1d4ed8; }
  .view-more--blue:hover{ background:#eff6ff; }

  @media (max-width:768px){
    .card-view-more .view-more{
      width:100%;
      max-width:100%;
      min-height:44px;
      font-size:13px;
      padding:10px 12px;
    }
  }

@media (max-width:768px){
  /*
   * Mobile homepage visual order (SSR DOM unchanged; flex order only).
   * Breaking → Small Boxes → Finder → Popular Categories → Listings → Trending → About
   */
  body.page-home .main-container > .breaking-news {
    order: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
  }

  body.page-home .main-header {
    margin-bottom: 0;
  }

  body.page-home .site-main .main-container {
    margin-top: 0;
    padding-top: 0;
  }

  /* Tighter rhythm: breaking → small boxes → finder → categories → sections */
  body.page-home .main-container {
    gap: 12px;
  }

  body.page-home #dynamicSections.card-grid {
    margin-top: 0;
    padding-top: 10px;
  }

  body.page-home .breaking-news.breaking {
    align-items: center;
  }

  body.page-home .breaking-news .breaking-left {
    position: relative;
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    padding: 0 8px;
    background: transparent;
    font-size: 9px;
    z-index: 1;
  }

  body.page-home .breaking-news .breaking-left__label {
    display: none;
  }

  body.page-home .breaking-news .breaking-left__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 8px;
    background: var(--home-breaking-bg);
    color: var(--home-breaking-text);
    border: 1px solid var(--home-breaking-border);
    font-size: 12px;
    line-height: 0;
    box-shadow:none;
  }

  body.page-home .breaking-news .breaking-right {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    align-self: stretch;
    min-width: 0;
    padding: 0 6px 0 8px;
    overflow: hidden;
  }

  body.page-home .breaking-news .breaking-rotator {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 0;
  }

  body.page-home .breaking-news .breaking-rotator__viewport {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  body.page-home .breaking-news .breaking-rotator__track {
    align-items: center;
  }

  body.page-home .breaking-news .breaking-rotator__chip {
    min-height: 0;
    height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    align-self: center;
  }

  body.page-home .breaking-news .breaking-rotator__chip-inner {
    min-height: 38px;
    align-items: center;
  }

  body.page-home .breaking-news .breaking-rotator__title {
    font-size: 12px;
    line-height: 1.2;
  }

  body.page-home .breaking-news .home-badge {
    font-size: 9px;
    padding: 1px 5px;
  }

  body.page-home .breaking-news .breaking-rotator__controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    align-self: center;
  }

  body.page-home .breaking-news .breaking-rotator__dots {
    align-items: center;
  }

  body.page-home .main-container > #smallBoxes {
    order: 1;
  }

  body.page-home .main-container > #openFinder {
    order: 2;
  }

  body.page-home .main-container > #countdownBox {
    order: 2;
  }

  body.page-home .main-container > #taxonomyDiscovery {
    order: 3;
  }

  body.page-home .main-container > #dynamicSections {
    order: 4;
  }

  body.page-home .main-container > .trending-section {
    order: 5;
  }

  body.page-home .main-container > #about-site {
    order: 6;
  }

  /* Adjacent-sibling borders follow DOM, not visual order — rely on flex gap */
  body.page-home .main-container > .section + .section {
    padding-top: 0;
    border-top: none;
  }
}

/* Mobile search overlay (loads after duplicate .search-overlay rules above — full-width + touch targets) */
@media (max-width: 768px) {
  .search-overlay {
    box-sizing: border-box;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 88px max(12px, env(safe-area-inset-left)) 20px max(12px, env(safe-area-inset-right));
  }

  .search-overlay .search-box,
  .search-overlay .search-box * {
    box-sizing: border-box;
  }

  .search-overlay .search-box {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    height: auto;
    gap: 8px;
    align-items: stretch;
    padding: 0 0 0 4px;
  }

  .search-overlay .search-icon {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    font-size: 18px;
  }

  .search-overlay .search-box input,
  .search-overlay .search-box #searchInput,
  .search-overlay .search-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 16px;
  }

  .search-overlay .search-box button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
    align-self: stretch;
  }

  .search-suggestions,
  .recent-searches {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    width: auto;
    max-width: 100%;
    transform: none;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Desktop-only: balanced input/button proportions (mobile untouched above) */
@media (min-width: 769px) {
  .search-overlay .search-box {
    height: 54px;
    min-height: 54px;
    align-items: stretch;
  }

  .search-overlay .search-icon {
    align-self: center;
  }

  .search-overlay .search-box input,
  .search-overlay .search-box #searchInput,
  .search-overlay .search-input {
    min-height: 40px;
    padding: 8px 12px;
    line-height: 1.25;
    align-self: stretch;
  }

  .search-overlay .search-box button {
    font-size: 15px;
    line-height: 1.2;
    align-self: stretch;
  }
}
.popular-categories {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  min-height: 72px;
  box-sizing: border-box;
}

body.page-home .popular-categories {
  padding: 0;
}

.popular-categories__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--site-primary);
  text-align: left;
}

.popular-categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--home-gap-grid);
  align-items: stretch;
}

.popular-categories__grid--browse {
  max-width: 720px;
}

.popular-categories__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: var(--home-pill-2line-min-h);
  height: 100%;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
  border-radius: var(--site-radius-pill, 999px);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  color: #334155;
  background: #eef2f8;
  border: 1px solid #c5d4eb;
  box-shadow: none;
  box-sizing: border-box;
  transition: background-color var(--duration-fast, 0.15s) ease, border-color var(--duration-fast, 0.15s) ease, color var(--duration-fast, 0.15s) ease;
}

.popular-categories__pill:hover,
.popular-categories__pill:focus-visible {
  color: var(--brand-navy);
  background: #e4ebf5;
  border-color: #94a3b8;
  box-shadow: none;
  transform: none;
  text-decoration: none;
}

.popular-categories__pill--view-all {
  color: #1e3c72;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  box-shadow: none;
}

.popular-categories__pill--view-all:hover,
.popular-categories__pill--view-all:focus-visible {
  color: var(--brand-navy);
  background: #bfdbfe;
  border-color: #60a5fa;
  filter: none;
  box-shadow: none;
  transform: none;
}

/* Browse Categories page */
body.page-categories .site-main .main-container {
  margin-top: var(--space-24, 24px);
  margin-bottom: var(--space-32, 32px);
  padding: 0 var(--space-12, 12px);
  max-width: 960px;
}

.categories-page__title {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--site-primary);
}

.categories-page__lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  max-width: 42rem;
}

body.page-categories .categories-browse {
  margin-top: 4px;
  background: #eef2f8;
  border: 1px solid #c5d4eb;
  border-radius: var(--home-radius-sm, 12px);
  overflow: hidden;
  box-sizing: border-box;
}

body.page-categories .categories-browse .taxonomy-tabs {
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: #eef2f8;
  border-bottom: 1px solid #c5d4eb;
}

body.page-categories .categories-browse .taxonomy-tabs__btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  border: none;
  border-right: 1px solid #c5d4eb;
  border-radius: 0;
  margin: 0;
  min-height: 44px;
  padding: 10px 12px;
  background: #eef2f8;
  color: var(--site-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

body.page-categories .categories-browse .taxonomy-tabs__btn:last-child {
  border-right: none;
}

body.page-categories .categories-browse .taxonomy-tabs__btn.is-active {
  color: var(--home-cta-text);
  background: var(--home-cta-bg);
  border: none;
  border-right: 1px solid #c5d4eb;
  border-radius: 0;
  margin-bottom: 0;
  padding-bottom: 10px;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

body.page-categories .categories-browse .taxonomy-tabs__btn.is-active:last-child {
  border-right: none;
}

body.page-categories .categories-browse .taxonomy-tabs__btn.is-active::after {
  content: none;
  display: none;
}

body.page-categories .categories-browse .taxonomy-tabs__label {
  text-align: center;
}

body.page-categories .categories-browse .taxonomy-panels {
  min-height: 0;
  background: #fff;
}

body.page-categories .categories-browse .taxonomy-panel,
body.page-categories .categories-browse .categories-browse__panel {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  min-height: 0;
}

body.page-categories .categories-browse .taxonomy-panel.taxonomy-panel--active {
  display: block;
  background: #fff;
  padding: 14px 16px 16px;
}

body.page-categories .categories-browse .popular-categories {
  min-height: 0;
  padding: 0;
}

body.page-categories .categories-browse .popular-categories__grid--browse {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  max-width: none;
  align-items: stretch;
}

body.page-categories .categories-browse .popular-categories__pill {
  min-height: 44px;
  height: auto;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid #c5d4eb;
  color: #334155;
}

body.page-categories .categories-browse .popular-categories__pill:hover,
body.page-categories .categories-browse .popular-categories__pill:focus-visible {
  background: #e4ebf5;
  border-color: #94a3b8;
  color: var(--brand-navy);
  transform: none;
  box-shadow: none;
}

.categories-browse__empty {
  margin: 0;
  padding: 12px 0;
  font-size: 14px;
  color: #64748b;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  body.page-categories .categories-browse .taxonomy-tabs__btn:not(.is-active):hover {
    background: #e4ebf5;
    color: var(--brand-navy);
  }
}

@media (min-width: 769px) {
  body.page-categories .categories-browse .taxonomy-tabs__btn {
    font-size: 14px;
    padding: 12px 14px;
    min-height: 48px;
  }

  body.page-categories .categories-browse .popular-categories__grid--browse {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
  }

  body.page-categories .categories-browse .popular-categories__pill {
    font-size: 14px;
    padding: 11px 14px;
  }
}

/* ---------- Homepage taxonomy tabs — compact single-row accordion ---------- */
.taxonomy-discovery {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.taxonomy-discovery__hint {
  display: none;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--site-muted, #64748b);
  text-align: center;
}

.taxonomy-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--home-gap-grid-tight);
  margin: 0 0 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}

.taxonomy-tabs::-webkit-scrollbar {
  display: none;
}

.taxonomy-tabs__btn {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4, 4px);
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--site-radius-pill, 999px);
  border: 1px solid #c5d4eb;
  background: #eef2f8;
  color: var(--site-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}

.taxonomy-tabs__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taxonomy-tabs__sublabel {
  display: none;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--site-muted, #64748b);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.taxonomy-tabs__btn.is-active {
  color: var(--home-cta-text);
  background: var(--home-cta-bg);
  border: 1px solid var(--home-cta-border);
  border-bottom: none;
  border-radius: var(--home-radius-sm, 12px) var(--home-radius-sm, 12px) 0 0;
  margin-bottom: -1px;
  padding-bottom: 11px;
  box-shadow: none;
  position: relative;
  z-index: 3;
}

body.page-home .taxonomy-tabs__btn.is-active {
  box-shadow: none;
}

.taxonomy-tabs__btn.is-active::after {
  content: "▼";
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.65em;
  line-height: 1;
  margin-left: 2px;
}

.taxonomy-panels {
  position: relative;
  min-height: 52px;
}

.taxonomy-panel__inner {
  min-height: 0;
}

.taxonomy-discovery .taxonomy-panel {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  box-sizing: border-box;
}

.taxonomy-discovery .taxonomy-panel.taxonomy-panel--active {
  display: block;
  margin-top: 0;
}

body.page-home .taxonomy-discovery .popular-categories {
  min-height: 0;
}

/* Single-row content: 2 preview pills + View All (always 3rd) */
body.page-home .taxonomy-discovery .popular-categories__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--home-gap-grid-tight);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-height: 44px;
}

body.page-home .taxonomy-discovery .popular-categories__row::-webkit-scrollbar {
  display: none;
}

body.page-home .taxonomy-discovery .popular-categories__pill {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  width: auto;
  height: 44px;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

body.page-home .taxonomy-discovery .popular-categories__pill-count {
  font-weight: 500;
  font-size: 0.9em;
  color: var(--site-muted, #64748b);
  opacity: 0.92;
}

body.page-home .taxonomy-discovery .popular-categories__pill--view-all {
  flex: 1 1 0;
  flex-shrink: 0;
  min-width: 88px;
}

/* View All — secondary CTA in taxonomy discovery (categories remain primary) */
body.page-home .taxonomy-discovery .popular-categories__pill:not(.popular-categories__pill--view-all) {
  background: #f8fafc;
  border: 1px solid #c5d4eb;
  box-shadow: none;
  color: #334155;
}

body.page-home .taxonomy-discovery .popular-categories__pill:not(.popular-categories__pill--view-all):hover,
body.page-home .taxonomy-discovery .popular-categories__pill:not(.popular-categories__pill--view-all):focus-visible {
  background: #e4ebf5;
  border-color: #94a3b8;
  box-shadow: none;
  color: var(--brand-navy);
}

body.page-home .taxonomy-discovery .popular-categories__pill--view-all,
body.page-home .taxonomy-discovery .taxonomy-panel--active .popular-categories__pill--view-all,
body.page-home .taxonomy-discovery .popular-categories__pill--view-all:any-link {
  color: #1e3c72;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  box-shadow: none;
  font-weight: 600;
  font-size: 0.93em;
}

body.page-home .taxonomy-discovery .popular-categories__pill--view-all:hover,
body.page-home .taxonomy-discovery .popular-categories__pill--view-all:focus-visible {
  color: var(--brand-navy);
  background: #bfdbfe;
  border-color: #60a5fa;
  transform: none;
  box-shadow: none;
}

/* Homepage taxonomy — compact link row (same on mobile + desktop) */
body.page-home .taxonomy-discovery--mobile-links {
  box-sizing: border-box;
  background: #eef2f8;
  border: 1px solid #c5d4eb;
  border-radius: var(--home-radius-sm, 12px);
  overflow: hidden;
  padding: 0;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-panels {
  display: none;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs {
  gap: 0;
  margin: 0;
  background: #eef2f8;
  overflow-x: visible;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: space-between;
  gap: 4px;
  color: var(--site-primary);
  background: #eef2f8;
  border: none;
  border-right: 1px solid #c5d4eb;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 40px;
  padding: 8px 10px;
  box-shadow: none;
  font-weight: 600;
  font-size: 12px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn:last-child {
  border-right: none;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-size: 12px;
  line-height: 1.15;
  color: var(--site-primary);
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn.is-active {
  color: var(--site-primary);
  background: #eef2f8;
  border: none;
  border-right: 1px solid #c5d4eb;
  border-bottom: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 8px 10px;
  box-shadow: none;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn.is-active:last-child {
  border-right: none;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn:active {
  background: #e4ebf5;
}

body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn::after,
body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn.is-active::after {
  content: "→";
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.85em;
  line-height: 1;
  margin-left: 4px;
  opacity: 0.88;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

@media (min-width: 769px) {
  .taxonomy-tabs {
    gap: var(--home-gap-grid);
    overflow-x: visible;
  }

  .taxonomy-tabs__btn {
    font-size: 14px;
    padding: 12px 16px;
    flex-shrink: 1;
  }

  .taxonomy-tabs__btn.is-active {
    padding-bottom: 13px;
    box-shadow: none;
  }

  .taxonomy-tabs__btn:not(.is-active):hover {
    border-color: #94a3b8;
    background: #e4ebf5;
    color: var(--brand-navy);
    box-shadow: none;
  }

  body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 40px;
  }

  body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn::after,
  body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn.is-active::after {
    content: "→";
  }

  @media (hover: hover) and (pointer: fine) {
    body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn:hover {
      background: #e4ebf5;
      color: var(--brand-navy);
    }

    body.page-home .taxonomy-discovery--mobile-links .taxonomy-tabs__btn:hover::after {
      opacity: 1;
      transform: translateX(2px);
    }
  }
}

@media (max-width: 768px) {
  .taxonomy-tabs__btn {
    font-size: 12px;
    padding: 8px 8px;
    min-height: 36px;
    min-width: 88px;
  }

  .taxonomy-tabs__btn.is-active {
    padding-bottom: 9px;
  }

  .taxonomy-panels {
    min-height: 44px;
  }

  body.page-home .taxonomy-discovery {
    margin-top: 0;
  }

  body.page-home .taxonomy-discovery .taxonomy-tabs {
    margin-bottom: 0;
  }

  body.page-home .taxonomy-discovery .taxonomy-panel.taxonomy-panel--active {
    background: #eef2f8;
    border: 1px solid #c5d4eb;
    border-top: none;
    border-radius: 0 var(--home-radius-sm, 12px) var(--home-radius-sm, 12px) var(--home-radius-sm, 12px);
    box-shadow: none;
    padding: 8px;
  }

  body.page-home .taxonomy-discovery .popular-categories__row {
    min-height: 36px;
  }

  body.page-home .taxonomy-discovery .popular-categories__pill {
    font-size: 12px;
    padding: 6px 8px;
    height: 36px;
    min-height: 36px;
    line-height: 1.2;
  }

  body.page-home .taxonomy-discovery .popular-categories__pill--view-all {
    min-width: 76px;
    font-size: 0.88em;
  }

  body.page-home .taxonomy-discovery .popular-categories__pill:hover,
  body.page-home .taxonomy-discovery .popular-categories__pill:focus-visible {
    transform: none;
  }

  .categories-page__title {
    font-size: 1.35rem;
  }
}

/* Categories page — mobile overrides (after generic taxonomy rules) */
@media (max-width: 768px) {
  body.page-categories .site-main .main-container {
    margin-top: 12px;
    margin-bottom: 20px;
    padding: 0 12px;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.page-categories .categories-page__lead {
    margin-bottom: 14px;
    font-size: 14px;
  }

  body.page-categories .categories-browse {
    width: 100%;
    max-width: 100%;
  }

  body.page-categories .categories-browse .taxonomy-tabs {
    overflow: visible;
    gap: 0;
  }

  body.page-categories .categories-browse .taxonomy-tabs__btn {
    flex: 1 1 0;
    flex-shrink: 1;
    min-width: 0;
    max-width: none;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
    border-radius: 0;
  }

  body.page-categories .categories-browse .taxonomy-tabs__btn.is-active {
    border-radius: 0;
    margin-bottom: 0;
    padding-bottom: 8px;
    border-bottom: none;
  }

  body.page-categories .categories-browse .taxonomy-tabs__btn.is-active::after {
    content: none;
    display: none;
  }

  body.page-categories .categories-browse .taxonomy-tabs__label {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    font-size: 11px;
  }

  body.page-categories .categories-browse .taxonomy-panels {
    min-height: 0;
  }

  body.page-categories .categories-browse .taxonomy-panel.taxonomy-panel--active {
    padding: 12px 10px 14px;
    border: none;
    border-radius: 0;
    background: #fff;
  }

  body.page-categories .categories-browse .popular-categories__grid--browse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.page-categories .categories-browse .popular-categories__pill {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 42px;
    height: auto;
    line-height: 1.2;
    border-radius: 10px;
  }
}
