/* ===== Tokens / Theme (brand colours) ===== */
    #mq-library.mq-lib{
      --ink:#0f2333;
      --muted:#2a3d4a;
      --sky:#0a6aa1;
      --sky-2:#0e4f78;
      --gold:#f5c76d;
      --gold-2:#e7ad38;
      --white:#ffffff;
      --pill:999px;
      --radius-lg:24px;
      --radius-md:18px;
      --shadow-lg:0 28px 60px rgba(6,55,94,.16);
      --shadow-md:0 16px 32px rgba(6,55,94,.12);
      --shadow-sm:0 8px 18px rgba(6,55,94,.10);
      font-family:"Inter",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
      color:var(--ink);
      background:
        radial-gradient(1200px 700px at 120% -20%, rgba(10,106,161,.10), transparent 60%),
        radial-gradient(900px 520px at -12% -25%, rgba(231,173,56,.08), transparent 55%),
        linear-gradient(180deg,#f7fbff,#eff6ff);
      padding:clamp(46px,6.5vw,80px) 16px;
      border-top:1px solid rgba(14,79,120,.08);
      position:relative;
      isolation:isolate;
      overflow:hidden;
    }

    /* subtle stars */
    #mq-library.mq-lib::before{
      content:"";
      position:absolute; inset:0;
      pointer-events:none;
      opacity:.25;
      background:
        radial-gradient(2px 2px at 12% 18%, rgba(14,79,120,.25), transparent 60%),
        radial-gradient(2px 2px at 30% 78%, rgba(231,173,56,.23), transparent 60%),
        radial-gradient(2px 2px at 72% 30%, rgba(14,79,120,.20), transparent 60%),
        radial-gradient(2px 2px at 90% 62%, rgba(231,173,56,.20), transparent 60%);
      mix-blend-mode:multiply;
    }

    #mq-library .wrap{
      max-width:1180px;
      margin:0 auto;
      display:grid;
      gap:clamp(26px,3.6vw,40px);
      position:relative;
      z-index:1;
    }

    /* ===== Section header ===== */
    #mq-library .head{
      text-align:center;
      display:grid;
      gap:10px;
      justify-items:center;
    }
    #mq-library .eyebrow{
      display:inline-flex;
      align-items:center;
      gap:6px;
      padding:5px 12px;
      border-radius:var(--pill);
      font-size:11px;
      font-weight:900;
      letter-spacing:.08em;
      text-transform:uppercase;
      background:linear-gradient(180deg,#ffffff,#f7fbff);
      border:1px solid rgba(14,79,120,.12);
      color:var(--sky-2);
      box-shadow:0 8px 18px rgba(6,55,94,.10);
    }
    #mq-library .eyebrow span{
      width:18px;
      height:18px;
      border-radius:50%;
      background:linear-gradient(180deg,var(--gold),var(--gold-2));
      display:inline-flex;
      align-items:center;
      justify-content:center;
      font-size:11px;
      color:#4b3000;
      font-weight:900;
    }
    #mq-library h1, #mq-library h2{
      margin:8px 0 4px;
      color:var(--sky-2);
      font-weight:900;
      letter-spacing:.2px;
      font-size:clamp(22px,3.6vw,38px);
      line-height:1.15;
    }
    #mq-library .u{
      width:min(360px,52%);
      height:8px;
      border-radius:var(--pill);
      background:linear-gradient(90deg,var(--gold),var(--gold-2));
      box-shadow:0 12px 24px rgba(231,173,56,.28);
    }
    #mq-library .sub{
      margin:0;
      max-width:720px;
      color:var(--muted);
      font-size:clamp(14px,1.05vw,17px);
      line-height:1.9;
    }

    /* ===== Group titles ===== */
    #mq-library .group-head{
      display:flex;
      justify-content:space-between;
      align-items:flex-end;
      gap:10px;
      margin-top:8px;
    }
    #mq-library .group-title{
      margin:0;
      font-weight:800;
      color:var(--sky-2);
      font-size:clamp(16px,1.7vw,18px);
    }
    #mq-library .group-note{
      margin:0;
      font-size:12.5px;
      color:var(--muted);
      opacity:.9;
    }

    /* ===== Grid ===== */
    #mq-library .grid{
      margin-top:10px;
      display:grid;
      gap:clamp(12px,1.8vw,18px);
    }
    #mq-library .grid-four{
      grid-template-columns:repeat(4,minmax(0,1fr));
    }
    #mq-library .grid-three{
      grid-template-columns:repeat(3,minmax(0,1fr));
    }
    @media (max-width:980px){
      #mq-library .grid-four{ grid-template-columns:repeat(3,minmax(0,1fr)); }
      #mq-library .grid-three{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    }
    @media (max-width:640px){
      #mq-library .grid-four,
      #mq-library .grid-three{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    }
    @media (max-width:480px){
      #mq-library .grid-four,
      #mq-library .grid-three{ grid-template-columns:1fr; }
    }

    /* ===== Card (new rectangular style, no arches) ===== */
    #mq-library .card{
      position:relative;
      background:linear-gradient(180deg,#ffffff,#fbfdff);
      border-radius:var(--radius-md);
      border:1px solid rgba(14,79,120,.16);
      box-shadow:var(--shadow-sm);
      padding:12px 13px 13px;
      display:grid;
      gap:6px;
      min-height:120px;
      overflow:hidden;
      transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
    }
    #mq-library .card::before{
      content:"";
      position:absolute;
      inset:-40% 40% auto -20%;
      opacity:.65;
      background:radial-gradient(120px 120px at 0% 0%, rgba(10,106,161,.12), transparent 70%);
      pointer-events:none;
    }
    #mq-library .card:hover{
      transform:translateY(-4px);
      box-shadow:0 18px 34px rgba(6,55,94,.14);
      border-color:rgba(14,79,120,.28);
      background:linear-gradient(180deg,#ffffff,#f5f9ff);
    }

    #mq-library .badge{
      position:absolute;
      right:10px;
      top:9px;
      padding:4px 8px;
      border-radius:var(--pill);
      font-size:11px;
      font-weight:800;
      color:#4b3000;
      background:linear-gradient(180deg,var(--gold),var(--gold-2));
      box-shadow:0 8px 18px rgba(229,170,62,.28);
      z-index:2;
    }

    #mq-library .icon-circle{
      width:32px;
      height:32px;
      border-radius:50%;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      background:rgba(10,106,161,.10);
      color:var(--sky-2);
      box-shadow:0 6px 12px rgba(6,55,94,.12);
      z-index:1;
    }
    #mq-library .icon-circle svg{
      width:18px;
      height:18px;
    }

    #mq-library .card-title{
      margin:2px 0 0;
      font-weight:800;
      color:var(--sky-2);
      font-size:14px;
      line-height:1.35;
      z-index:1;
    }
    #mq-library .card-text{
      margin:0;
      font-size:13px;
      line-height:1.7;
      color:var(--muted);
      opacity:.92;
      z-index:1;
    }

    #mq-library .card-footer{
      margin-top:4px;
      display:flex;
      align-items:center;
      gap:6px;
      font-size:12px;
      font-weight:700;
      color:var(--sky-2);
      opacity:.94;
      z-index:1;
    }
    #mq-library .card-footer svg{
      width:14px;
      height:14px;
    }

    /* invisible overlay link */
    #mq-library .card a{
      position:absolute;
      inset:0;
      border-radius:inherit;
      text-indent:-9999px;
      overflow:hidden;
      z-index:3;
    }

    /* RTL helper */
    html[dir="rtl"] #mq-library .group-head{ flex-direction:row-reverse; text-align:right; }
    html[dir="rtl"] #mq-library .card-text,
    html[dir="rtl"] #mq-library .card-title{ text-align:right; }