@font-face{
  font-family:"Barlow";
  src:url("./fonts/Barlow-Regular.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Barlow";
  src:url("./fonts/Barlow-Medium.ttf") format("truetype");
  font-weight:500;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Barlow";
  src:url("./fonts/Barlow-SemiBold.ttf") format("truetype");
  font-weight:600;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Barlow";
  src:url("./fonts/Barlow-Bold.ttf") format("truetype");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Barlow";
  src:url("./fonts/Barlow-ExtraBold.ttf") format("truetype");
  font-weight:800;
  font-style:normal;
  font-display:swap;
}

    :root{
      --rm-search-primary:#18224a;
      --rm-search-primary-2:#123e67;
      --rm-search-blue:#0db6c7;
      --rm-search-blue-dark:#0799aa;
      --rm-search-bg:#f4f6fa;
      --rm-search-text:#17223b;
      --rm-search-muted:#6c7282;
      --rm-search-border:#dfe5ee;
      --rm-search-pill:#eef4ff;
      --rm-search-gold:#c8952f;
      --rm-search-card:#ffffff;
      --rm-agent-blue:#3d75d8;
    }

    *{box-sizing:border-box}
    body{
      margin:0;
      font-family:"Barlow", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color:var(--rm-search-text);
      background:var(--rm-search-bg);
      font-size:14px;
    }

    /* ======= Layout de referencia / header demo ======= */
    .rm-search-site-header{background:#fff;border-bottom:1px solid #edf0f5}
    .rm-search-site-top{height:64px;display:flex;align-items:center;justify-content:space-between;gap:1rem}
    .rm-search-brand{display:flex;align-items:center;gap:.65rem;color:#243154;font-weight:700;letter-spacing:.03em;font-family:Georgia,serif;font-size:1.05rem}
    .rm-search-brand-mark{width:34px;height:34px;border:2px solid #263452;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:.75rem}
    .rm-search-site-actions{display:flex;align-items:center;gap:1.1rem;color:#273250;font-size:.68rem;text-transform:uppercase;font-weight:700}
    .rm-search-site-input{width:178px;height:34px;border:1px solid #d8dce5;border-radius:4px;padding:.35rem .7rem;color:#7b8190}
    .rm-search-nav{background:#171b43;color:#fff}
    .rm-search-nav .nav-link{color:#fff;font-size:.76rem;font-weight:600;padding:1rem 1.15rem;opacity:.95}
    .rm-search-breadcrumb{background:#fff;height:38px;display:flex;align-items:center;font-size:.75rem;color:#657083;border-bottom:1px solid #eef1f5}

    /* ======= Buscador principal ======= */
    .rm-search-hero{
      position:relative;
      overflow:hidden;
      min-height:255px;
      color:#fff;
      background:linear-gradient(110deg,#1c2b5f 0%,#154870 58%,#115880 100%);
    }
    .rm-search-hero::after{
      content:"";
      position:absolute;
      right:-20px;
      top:-84px;
      width:285px;
      height:285px;
      border-radius:50%;
      background:rgba(31,139,176,.18);
    }
    .rm-search-hero-inner{position:relative;z-index:1;padding:72px 0 36px;max-width:1140px;margin:auto}
    .rm-search-title{font-size:3.55rem;line-height:1;font-weight:800;letter-spacing:-.04em;margin-bottom:1.1rem}
    .rm-search-description{display:none;color:#dce8f5;max-width:720px;margin-bottom:1.3rem;font-size:1rem}

    .rm-search-box-card{background:#fff;border-radius:10px;padding:.95rem;box-shadow:0 18px 45px rgba(0,0,0,.11);width:100%;max-width:none}
    .rm-search-box-title{font-size:.72rem;font-weight:800;text-transform:uppercase;color:#1e2b4d;letter-spacing:.08em;margin:0 0 .55rem}
    .rm-search-box-form{display:flex;border:1px solid #e3e8f0;border-radius:5px;overflow:hidden;background:#fff;height:46px}
    .rm-search-box-input{flex:1;border:0;padding:0 1rem;color:#262d3d;outline:0;font-size:.93rem}
    .rm-search-box-input::placeholder{color:#a0a6b2}
    .rm-search-box-submit{width:115px;border:0;background:var(--rm-search-gold);color:#fff;font-weight:800;text-transform:uppercase;font-size:.78rem;letter-spacing:.04em;transition:.2s ease}
    .rm-search-box-submit:hover{background:#b68426}
    .rm-search-box-frequent{display:flex;align-items:center;gap:.42rem;flex-wrap:wrap;margin-top:.6rem;font-size:.72rem;color:#677183}
    .rm-search-box-frequent-label{font-weight:700;color:#7c8494}
    .rm-search-box-tag{border:1px solid #dbe4f4;background:#f4f7fc;color:#314269;border-radius:999px;padding:.22rem .55rem;font-weight:600;text-decoration:none;cursor:pointer}
    .rm-search-box-tag:hover{background:#eaf1fb;color:#17224a}

    .rm-search-main{padding:20px 0 64px;max-width:1140px;margin:auto}
    .rm-search-filter-toggle{display:none;align-items:center;gap:.45rem;border:1px solid #0bb7c7;background:#fff;color:#0496a4;border-radius:5px;font-weight:800;font-size:.78rem;padding:.55rem .75rem;margin-bottom:12px}
    .rm-search-filter-backdrop{display:none}
    .rm-search-grid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:22px;align-items:start}

    /* ======= Filtros ======= */
    .rm-search-filter-panel-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}
    .rm-search-filter-heading{font-weight:800;text-transform:uppercase;font-size:.78rem;color:#1b274a;letter-spacing:.06em;margin:0}
    .rm-search-filter-clear{border:1px solid #bcebf0;background:#fff;color:#0b9cab;border-radius:999px;font-size:.72rem;padding:.2rem .55rem;text-decoration:none;font-weight:600}
    .rm-search-filter-card{background:#fff;border:1px solid var(--rm-search-border);border-radius:4px;margin-bottom:10px;overflow:hidden}
    .rm-search-filter-btn{width:100%;border:0;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:.78rem .88rem;font-weight:800;text-transform:uppercase;color:#243154;font-size:.72rem;letter-spacing:.05em}
    .rm-search-filter-btn::after{content:"▾";font-size:.7rem;color:#647088;transition:.2s ease}
    .rm-search-filter-btn[aria-expanded="true"]::after{transform:rotate(180deg)}
    .rm-search-filter-body{padding:.65rem .85rem .8rem;border-top:1px solid #eef2f7}
    .rm-check-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:.35rem 0;color:#44506a;font-size:.78rem}
    .rm-check-label{display:flex;align-items:center;gap:.5rem;min-width:0}
    .rm-check{width:13px;height:13px;accent-color:#223c80;flex:none}
    .rm-search-filter-count{background:#edf1f7;color:#6f788c;border-radius:999px;font-size:.63rem;font-weight:800;min-width:30px;text-align:center;padding:.16rem .38rem;transition:.18s ease}
    .rm-check-row.is-active .rm-search-filter-count{background:#1f315f;color:#fff}
    .rm-search-filter-count-muted{background:#edf1f7;color:#6f788c}
    .rm-cmbbox{width:100%;height:32px;border:1px solid #dce3ee;border-radius:4px;color:#596276;font-size:.76rem;padding:.25rem .5rem;background:#fff}
    .rm-search-filter-year{display:grid;gap:.45rem;margin-bottom:.65rem}
    .rm-search-filter-year label{font-size:.7rem;text-transform:uppercase;font-weight:700;color:#4d5870;margin:0}

    /* ======= Resultados ======= */
    .rm-search-results-head{display:flex;justify-content:space-between;align-items:start;gap:1rem;margin-bottom:.8rem}
    .rm-search-results-left{min-width:0}
    .rm-search-results-titleline{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin-bottom:.45rem}
    .rm-search-results-title{font-size:1rem;font-weight:800;margin:0;color:#1a2443}
    .rm-search-results-total{color:#039aa9;font-weight:800;font-size:.98rem}
    .rm-search-results-chips{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}
    .rm-search-results-chip{border:1px solid #b9edf2;color:#0a98a8;background:#f5feff;border-radius:999px;font-size:.74rem;padding:.25rem .5rem;font-weight:600;display:inline-flex;align-items:center;gap:.28rem;cursor:pointer;transition:.18s ease}
    .rm-search-results-chip:hover{background:#e8fcff;border-color:#0bb7c7;color:#047d8a}
    .rm-search-results-chip-remove{font-weight:900;line-height:1;font-size:.8rem}
    .rm-search-results-order{display:flex;align-items:center;gap:.5rem;color:#6a7284;font-size:.78rem;white-space:nowrap}
    .rm-search-results-order .rm-cmbbox{height:36px;min-width:168px;font-weight:600}

    .rm-search-results-list{display:grid;gap:10px}
    .rm-search-results-card{background:#fff;border:1px solid #dfe6ef;border-radius:7px;padding:1rem 1.05rem .9rem;transition:.2s ease}
    .rm-search-results-card.is-featured{border-color:#13bdc9;box-shadow:0 0 0 1px rgba(19,189,201,.25)}
    .rm-search-results-top{display:flex;align-items:start;justify-content:space-between;gap:1rem}
    .rm-search-results-status{background:#d8f2db;color:#167331;border-radius:3px;font-size:.68rem;font-weight:800;padding:.18rem .5rem;white-space:nowrap}
    .rm-search-results-item-title{font-size:.9rem;font-weight:800;color:#15254d;text-transform:uppercase;margin:0 0 .35rem}
    .rm-search-results-meta,.rm-search-result-card-meta{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;color:#7c8495;font-size:.73rem;margin-bottom:.65rem}
    .rm-search-result-card-meta span{display:inline-flex;align-items:center;gap:.25rem}
    .rm-search-result-card-meta .bi{font-size:.86rem;color:#718097;line-height:1}
    .rm-search-results-desc{font-size:.84rem;color:#3f4656;margin:0 0 1.2rem;line-height:1.45}
    .rm-search-results-bottom{display:grid;grid-template-columns:1fr 245px;gap:1rem;align-items:end}
    .rm-search-results-tags{display:flex;align-items:center;gap:.42rem;flex-wrap:wrap}
    .rm-search-results-tag{background:#eef3ff;color:#304b86;border-radius:999px;font-size:.68rem;font-weight:700;padding:.24rem .55rem}
    .rm-search-results-actions{display:flex;justify-content:flex-end;gap:.45rem}
    .rm-btn{border-radius:4px;border:1px solid transparent;font-weight:800;font-size:.72rem;padding:.48rem .75rem;display:inline-flex;align-items:center;justify-content:center;gap:.35rem;text-decoration:none;line-height:1;transition:.18s ease;cursor:pointer}
    .rm-btn-primary{background:#fff;border-color:var(--rm-search-border);color:#1a2748}
    .rm-btn-primary:hover{background:#f7f9fc;color:#101a34}
    .rm-btn-outline{background:#fff;border-color:#0bb7c7;color:#0496a4}
    .rm-btn-outline:hover{background:#ebfdff;color:#047885}

    .rm-search-results-foot{text-align:center;margin-top:16px;color:#6f7787;font-size:.78rem}
    .rm-search-pagination{display:flex;align-items:center;justify-content:center;gap:.28rem;margin-bottom:.6rem}
    .rm-search-page{border:1px solid #dce3ee;background:#fff;color:#34415d;min-width:31px;height:31px;border-radius:4px;padding:0 .55rem;font-size:.78rem;font-weight:700}
    .rm-search-page.active{background:#203364;color:#fff;border-color:#203364}
    .rm-search-results-ai{font-size:.74rem;color:#8991a1}

    /* ======= Debug ======= */
    .rm-search-debug{background:#0e172b;color:#d7e3ff;border-radius:8px;margin-top:18px;overflow:hidden;border:1px solid rgba(255,255,255,.08)}
    .rm-search-debug-head{display:flex;align-items:center;justify-content:space-between;padding:.8rem 1rem;border-bottom:1px solid rgba(255,255,255,.1)}
    .rm-search-debug-title{margin:0;font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#fff}
    .rm-search-debug-body{max-height:170px;overflow:auto;padding:.85rem 1rem;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.74rem;line-height:1.6;white-space:pre-wrap}

    /* ======= Agente ======= */
    .rm-agent{position:fixed;right:28px;bottom:28px;z-index:1000;font-family:"Barlow",sans-serif}
    .rm-agent-launcher{width:58px;height:58px;border-radius:50%;border:0;background:linear-gradient(135deg,#5b8ce6,#2d62c9);box-shadow:0 12px 30px rgba(34,84,177,.35);display:grid;place-items:center;color:#fff;cursor:pointer;position:relative}
    .rm-agent-launcher::before{content:"";position:absolute;inset:8px;border:2px solid rgba(255,255,255,.72);border-radius:50%}
    .rm-agent-launcher-icon{width:30px;height:24px;border-radius:13px;background:#112a67;position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:4px}
    .rm-agent-launcher-icon span{width:4px;height:4px;background:#fff;border-radius:50%}
    .rm-agent-window{position:absolute;right:0;bottom:75px;width:290px;background:#fff;border:1px solid #dfe6f0;border-radius:12px;box-shadow:0 22px 55px rgba(22,31,54,.2);overflow:hidden;transform:translateY(10px) scale(.98);opacity:0;pointer-events:none;transition:.22s ease}
    .rm-agent.is-open .rm-agent-window{transform:translateY(0) scale(1);opacity:1;pointer-events:auto}
    .rm-agent-header{height:46px;display:flex;align-items:center;justify-content:space-between;padding:0 .85rem;background:#fff;border-bottom:1px solid #ecf0f6}
    .rm-agent-brand{display:flex;align-items:center;gap:.45rem;font-weight:800;color:#2a3a62;font-size:.83rem}
    .rm-agent-brand-icon{width:22px;height:22px;border-radius:50%;background:#e8f1ff;display:grid;place-items:center;color:#346bd1;font-size:.75rem}
    .rm-agent-close{border:0;background:transparent;color:#758098;font-size:1.2rem;line-height:1;cursor:pointer}
    .rm-agent-body{height:230px;padding:.85rem;background:#f8fafe;overflow:auto}
    .rm-agent-msg{display:flex;gap:.5rem;margin-bottom:.75rem;align-items:flex-start}
    .rm-agent-msg-avatar{width:24px;height:24px;border-radius:50%;background:#e7efff;color:#3470d3;display:grid;place-items:center;flex:none;font-size:.7rem;font-weight:900}
    .rm-agent-bubble{background:#fff;border-radius:12px;padding:.65rem .75rem;color:#596274;font-size:.75rem;line-height:1.45;box-shadow:0 1px 2px rgba(0,0,0,.04);max-width:220px}
    .rm-agent-msg-user{justify-content:flex-end}
    .rm-agent-msg-user .rm-agent-bubble{background:#eaf4ff;color:#223b6a}
    .rm-agent-typing{display:inline-flex;gap:4px;align-items:center;height:12px}
    .rm-agent-typing span{width:5px;height:5px;background:#8aa1c5;border-radius:50%;animation:rmAgentTyping .9s infinite ease-in-out}
    .rm-agent-typing span:nth-child(2){animation-delay:.15s}
    .rm-agent-typing span:nth-child(3){animation-delay:.3s}
    @keyframes rmAgentTyping{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
    .rm-agent-footer{padding:.65rem;background:#fff;border-top:1px solid #ecf0f6}
    .rm-agent-form{display:flex;align-items:center;gap:.45rem;border:1px solid #dfe6ef;border-radius:999px;padding:.28rem .32rem .28rem .75rem;background:#fff}
    .rm-agent-input{border:0;outline:0;min-width:0;flex:1;font-size:.72rem;color:#26304a;background:transparent}
    .rm-agent-input:disabled{background:transparent;color:#a0a8b8}
    .rm-agent-send{width:31px;height:31px;border-radius:50%;border:0;background:#5d82d9;color:#fff;font-weight:900;display:grid;place-items:center;cursor:pointer}
    .rm-agent-send:disabled{opacity:.5;cursor:not-allowed}
    .rm-agent-terms{text-align:center;font-size:.62rem;color:#9aa3b3;margin-top:.35rem}

    /* ======= Responsive ======= */
    @media (max-width: 991.98px){
      .rm-search-site-actions,.rm-search-nav{display:none}
      .rm-search-title{font-size:2.65rem}
      .rm-search-hero-inner,.rm-search-main{padding-left:1rem;padding-right:1rem}
      .rm-search-filter-toggle{display:inline-flex;position:sticky;top:10px;z-index:820}
      .rm-search-grid{grid-template-columns:1fr}
      .rm-search-filter{
        position:fixed;
        top:0;
        left:0;
        bottom:0;
        width:min(330px,86vw);
        z-index:900;
        background:var(--rm-search-bg);
        padding:18px 16px 28px;
        overflow-y:auto;
        transform:translateX(-105%);
        visibility:hidden;
        box-shadow:18px 0 45px rgba(15,27,55,.18);
        transition:transform .28s ease, visibility .28s ease;
      }
      .rm-search-filter.is-visible{transform:translateX(0);visibility:visible}
      .rm-search-filter-backdrop{
        display:block;
        position:fixed;
        inset:0;
        z-index:880;
        background:rgba(9,18,40,.42);
        opacity:0;
        pointer-events:none;
        transition:opacity .25s ease;
      }
      .rm-search-filter-backdrop.is-visible{opacity:1;pointer-events:auto}
      body.rm-search-filter-open{overflow:hidden}
      .rm-search-results-bottom{grid-template-columns:1fr}
      .rm-search-results-actions{justify-content:flex-start}
    }
    @media (max-width: 575.98px){
      .rm-search-title{font-size:2.2rem}
      .rm-search-box-form{height:auto;display:grid;grid-template-columns:1fr}
      .rm-search-box-input{height:44px}
      .rm-search-box-submit{width:100%;height:42px}
      .rm-search-results-head{display:block}
      .rm-search-results-order{margin-top:.8rem}
      .rm-agent{right:16px;bottom:16px}
      .rm-agent-window{width:calc(100vw - 32px)}
    }