/* ── BLOG EXTENSIONS ── */
/* Card grid */
.blog-hero{background:linear-gradient(135deg,#0f1729 0%,#162460 55%,#1a3fc4 100%);padding:3.2rem 0 2.8rem;position:relative;overflow:hidden}
.blog-hero::before{content:'';position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.025) 1px,transparent 1px);background-size:28px 28px;pointer-events:none}
.blog-hero-inner{position:relative;max-width:760px}
.blog-hero .eyebrow{color:rgba(255,255,255,.55)}
.blog-hero h1{color:#fff;font-size:clamp(1.8rem,4vw,3rem);margin-bottom:.9rem}
.blog-hero h1 em{color:var(--orange);font-style:normal}
.blog-hero p{font-size:.93rem;color:rgba(255,255,255,.62);line-height:1.85;max-width:560px;margin-bottom:1.6rem}
.blog-search{display:flex;gap:.6rem;max-width:460px}
.blog-search input{flex:1;padding:.6rem 1rem;border:1.5px solid rgba(255,255,255,.18);border-radius:var(--radius-sm);background:rgba(255,255,255,.08);color:#fff;font-family:'Poppins',sans-serif;font-size:.82rem;outline:none;transition:border-color .2s}
.blog-search input::placeholder{color:rgba(255,255,255,.38)}
.blog-search input:focus{border-color:rgba(255,255,255,.5)}
.blog-search button{padding:.6rem 1.2rem;background:var(--orange);color:#fff;border:none;border-radius:var(--radius-sm);font-family:'Poppins',sans-serif;font-size:.82rem;font-weight:700;cursor:pointer;white-space:nowrap;transition:background .2s}
.blog-search button:hover{background:#ea6c0a}

/* Category pills */
.cat-strip{background:var(--bg);border-bottom:1px solid var(--border);padding:.75rem 0;overflow-x:auto;scrollbar-width:none}
.cat-strip::-webkit-scrollbar{display:none}
.cat-strip .wrap{display:flex;gap:.5rem;align-items:center;flex-wrap:nowrap;min-width:max-content}
.cat-pill{display:inline-flex;align-items:center;gap:.3rem;padding:.32rem .85rem;border-radius:40px;font-size:.72rem;font-weight:600;border:1.5px solid var(--border);color:var(--body);background:var(--white);white-space:nowrap;transition:all .2s;cursor:pointer;text-decoration:none}
.cat-pill:hover,.cat-pill.active{background:var(--blue);border-color:var(--blue);color:#fff}
.cat-pill-count{font-size:.62rem;opacity:.65}

/* Blog grid layout */
.blog-layout{display:grid;grid-template-columns:1fr 320px;gap:2.8rem;align-items:start}
.blog-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
.blog-featured{grid-template-columns:1fr;gap:0;margin-bottom:1.8rem}

/* Post card */
.post-card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:all .3s;display:flex;flex-direction:column}
.post-card:hover{box-shadow:var(--sh-lg);transform:translateY(-3px);border-color:transparent}
.post-card-img{aspect-ratio:16/9;overflow:hidden;background:linear-gradient(135deg,var(--blue-l),#dde4ff);position:relative;flex-shrink:0}
.post-card-img-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:2.5rem}
.post-card-img img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.post-card:hover .post-card-img img{transform:scale(1.04)}
.post-card-body{padding:1.4rem 1.45rem;flex:1;display:flex;flex-direction:column}
.post-meta{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin-bottom:.75rem}
.post-cat{background:var(--blue-l);color:var(--blue);font-size:.6rem;font-weight:700;padding:.18rem .52rem;border-radius:3px;text-transform:uppercase;letter-spacing:.06em;text-decoration:none;transition:all .18s}
.post-cat:hover{background:var(--blue);color:#fff}
.post-date{font-size:.67rem;color:var(--muted);display:flex;align-items:center;gap:.28rem}
.post-read-time{font-size:.67rem;color:var(--muted);display:flex;align-items:center;gap:.28rem}
.post-dot{width:3px;height:3px;background:var(--border);border-radius:50%;flex-shrink:0}
.post-card h2,.post-card h3{font-size:.97rem;font-weight:700;color:var(--ink);line-height:1.35;margin-bottom:.5rem;transition:color .18s}
.post-card:hover h2,.post-card:hover h3{color:var(--blue)}
.post-card p.post-excerpt{font-size:.78rem;line-height:1.75;color:var(--muted);flex:1;margin-bottom:1rem}
.post-footer{display:flex;align-items:center;justify-content:space-between;padding-top:.9rem;border-top:1px solid var(--border);margin-top:auto}
.post-author-mini{display:flex;align-items:center;gap:.5rem}
.post-av{width:28px;height:28px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:.62rem;font-weight:700;flex-shrink:0}
.post-author-name{font-size:.7rem;font-weight:600;color:var(--body)}
.post-read-link{font-size:.72rem;font-weight:700;color:var(--blue);display:inline-flex;align-items:center;gap:.25rem;transition:gap .18s}
.post-read-link:hover{gap:.45rem}

/* Featured card (larger) */
.post-card.featured{flex-direction:row}
.post-card.featured .post-card-img{aspect-ratio:auto;width:42%;flex-shrink:0}
.post-card.featured .post-card-body{padding:2rem 1.8rem}
.post-card.featured h2{font-size:1.25rem;line-height:1.25;margin-bottom:.7rem}
.post-card.featured p.post-excerpt{font-size:.85rem;margin-bottom:1.3rem}

/* Sidebar */
.blog-sidebar{display:flex;flex-direction:column;gap:1.4rem;position:sticky;top:80px}
.sidebar-widget{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:1.4rem}
.sidebar-widget h4{font-size:17px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:1.1rem;padding-bottom:.65rem;border-bottom:1px solid var(--border)}
.sidebar-cats a{display:flex;align-items:center;justify-content:space-between;padding:.42rem 0;font-size: 17px;color:#0f1729;border-bottom:1px solid var(--border);transition:color .18s}
.sidebar-cats a:last-child{border-bottom:none}
.sidebar-cats a:hover{color:var(--blue)}
.sidebar-cats span{font-size:.67rem;background:var(--blue-l);color:var(--blue);padding:.1rem .38rem;border-radius:3px;font-weight:600}
.sidebar-recent a{display:flex;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--border);text-decoration:none;transition:all .18s}
.sidebar-recent a:last-child{border-bottom:none}
.sidebar-recent a:hover .sr-title{color:var(--blue)}
.sr-img{width:90px;max-height:100px;border-radius:5px; border: 1px solid #1a3fc4;/*background:var(--blue-l);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:1.1rem;overflow:hidden*/}
.sr-img img{width: 100%; height: auto;    border-radius: 5px;}
.sr-title{/*font-size:.75rem;font-weight:600;*/color:var(--ink);line-height:1.35;margin-bottom:.2rem;transition:color .18s}
.sr-date{font-size:.62rem;color:var(--muted)}
.sidebar-tags{display:flex;flex-wrap:wrap;gap:.4rem}
.sidebar-tags a{font-size:.67rem;font-weight:600;color:var(--blue);background:var(--blue-l);padding:.22rem .55rem;border-radius:3px;transition:all .18s}
.sidebar-tags a:hover{background:var(--blue);color:#fff}
.sidebar-cta{background:linear-gradient(135deg,var(--blue) 0%,var(--blue-d) 100%);border:none;color:#fff;text-align:center}
.sidebar-cta h4{color:rgba(255,255,255,.65);border-bottom-color:rgba(255,255,255,.15)}
.sidebar-cta p{font-size:17px;color:rgba(255,255,255,.72);line-height:1.6;margin-bottom:1.1rem}
.sidebar-cta .btn{width:100%;text-align:center;display:block}

/* Pagination */
.pagination{display:flex;align-items:center;justify-content:center;gap:.4rem;margin-top:2.4rem}
.page-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:6px;font-size:.78rem;font-weight:600;color:var(--body);border:1.5px solid var(--border);background:var(--white);transition:all .2s;cursor:pointer;text-decoration:none}
.page-btn:hover{border-color:var(--blue);color:var(--blue)}
.page-btn.active{background:var(--blue);border-color:var(--blue);color:#fff}
.page-btn.prev-next{width:auto;padding:0 .9rem;gap:.3rem;font-size:.74rem}

/* ── SINGLE POST ── */
.article-layout{display:grid;grid-template-columns:1fr 300px;gap:3rem;align-items:start}
.article-hero{background:linear-gradient(135deg,#0f1729 0%,#162460 55%,#1a3fc4 100%);padding:3rem 0 ;position:relative;overflow:hidden}
.article-hero::before{content:'';position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.025) 1px,transparent 1px);background-size:28px 28px;pointer-events:none}
/*.article-hero-inner{position:relative;max-width:800px}*/
.article-hero .post-meta{margin-bottom:1rem}
.article-hero h1{color:#fff;font-size:clamp(1.7rem,3.5vw,2.7rem);margin-bottom:1rem;line-height:1.18}
.article-hero h1 em{color:var(--orange);font-style:normal}
.article-hero .post-excerpt-hero{font-size:.93rem;color:rgba(255,255,255,.62);line-height:1.85;max-width:640px;margin-bottom:1.8rem}
.article-author-bar{display:flex;align-items:center;gap:1rem;padding:1.1rem 0;border-top:1px solid rgba(255,255,255,.1)}
.article-av{width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.15);border:2px solid rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;font-size:.85rem;font-weight:700;color:#fff;flex-shrink:0}
.article-author-info{flex:1}
.article-author-name{font-size:.82rem;font-weight:700;color:#fff}
.article-author-role{font-size:.68rem;color:rgba(255,255,255,.5);margin-top:.08rem}
.article-hero-img{width:100%;max-height:380px;border-radius:var(--radius) var(--radius) 0 0;margin-top:2rem;display:block}
.article-hero-img-placeholder{width:100%;/*height:280px;*/border-radius:var(--radius) var(--radius) 0 0;background:linear-gradient(135deg,rgba(26,63,196,.4),rgba(18,45,158,.6));/*display:flex;align-items:center;justify-content:center;font-size:4rem;margin-top:2rem*/}
.article-hero-img-placeholder img{width:100%;height:auto;}
.article-layout main{overflow: hidden;}
/* Article body * /
.article-body{background:var(--white);border:1px solid var(--border);border-radius:0 0 var(--radius) var(--radius);padding:2.4rem 2.6rem}
.article-body h2{font-size:1.35rem;margin:2rem 0 .8rem;color:var(--ink)}
.article-body h3{font-size:1.05rem;margin:1.6rem 0 .6rem;color:var(--ink)}
.article-body p{font-size:.91rem;line-height:1.95;color:var(--body);margin-bottom:1.1rem}
.article-body ul,.article-body ol{margin:.6rem 0 1.1rem 1.4rem}
.article-body ul{list-style:disc}
.article-body ol{list-style:decimal}
.article-body li{font-size:.89rem;line-height:1.8;color:var(--body);margin-bottom:.4rem}
.article-body strong{color:var(--ink);font-weight:700}
.article-body a{color:var(--blue);border-bottom:1px solid var(--blue-l);transition:border-color .18s}
.article-body a:hover{border-color:var(--blue)}
.article-body blockquote{border-left:3px solid var(--blue);background:var(--blue-l);padding:1rem 1.4rem;border-radius:0 var(--radius-sm) var(--radius-sm) 0;margin:1.4rem 0;font-size:.88rem;color:var(--body);font-style:italic;line-height:1.75}
.article-body blockquote strong{color:var(--blue);font-style:normal}
.article-body .callout{background:linear-gradient(135deg,var(--blue-l),#e8ecff);border:1px solid rgba(26,63,196,.15);border-radius:var(--radius);padding:1.2rem 1.4rem;margin:1.4rem 0}
.article-body .callout h4{font-size:.82rem;color:var(--blue);margin-bottom:.4rem}
.article-body .callout p{font-size:.82rem;margin-bottom:0;color:var(--body)}
.article-body table{width:100%;border-collapse:collapse;margin:1.4rem 0;font-size:.82rem}
.article-body th{background:var(--blue);color:#fff;font-weight:700;padding:.7rem 1rem;text-align:left;font-size:.75rem;letter-spacing:.04em}
.article-body td{padding:.65rem 1rem;border-bottom:1px solid var(--border);color:var(--body);vertical-align:top}
.article-body tr:last-child td{border-bottom:none}
.article-body tr:nth-child(even) td{background:var(--bg)}*/

/* Article tags + share */
.article-tags-share{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.9rem;padding-top:1.5rem;margin-top:1.5rem;border-top:1px solid var(--border)}
.article-tags{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}
.article-tags span{font-size:.68rem;font-weight:700;color:var(--muted);margin-right:.2rem}
.article-tags a{font-size:.67rem;font-weight:600;color:var(--blue);background:var(--blue-l);padding:.22rem .55rem;border-radius:3px;transition:all .18s}
.article-tags a:hover{background:var(--blue);color:#fff;border-bottom:none}
.share-row{display:flex;align-items:center;gap:.5rem}
.share-row span{font-size:.7rem;font-weight:700;color:var(--muted)}
.share-btn{width:30px;height:30px;border-radius:6px;display:flex;align-items:center;justify-content:center;border:1.5px solid var(--border);color:var(--body);transition:all .2s;cursor:pointer;background:var(--white)}
.share-btn:hover{border-color:var(--blue);color:var(--blue)}

/* Author box */
.author-box{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:1.6rem;margin-top:2rem;display:flex;gap:1.2rem;align-items:flex-start}
.author-box-av{width:164px;height:164px;border-radius:8px;background:var(--blue);color:#fff;/*display:flex;align-items:center;justify-content:center;font-size:1.3rem;font-weight:700;flex-shrink:0*/}
.author-box-av img{border-radius:8px;}
.author-box h4{font-size:.9rem;margin-bottom:.15rem}
.author-box-role{font-size:.68rem;color:var(--blue);font-weight:600;margin-bottom:.5rem}
.author-box p{/*font-size:.78rem;color:var(--muted);*/line-height:1.75;margin-bottom:.7rem}
.author-box-links{display:flex;gap:.5rem}
.author-box-links a{font-size:.67rem;font-weight:600;color:var(--blue);background:var(--blue-l);padding:.2rem .52rem;border-radius:3px;transition:all .18s}
.author-box-links a:hover{background:var(--blue);color:#fff}

/* Related posts */
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.1rem;margin-top:1.6rem}

/* ── AUTHOR PAGE ── */
.author-hero{background:linear-gradient(135deg,#0f1729 0%,#162460 60%,#1a3fc4 100%);padding:3.5rem 0;position:relative;overflow:hidden}
.author-hero::before{content:'';position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.025) 1px,transparent 1px);background-size:28px 28px;pointer-events:none}
.author-hero-inner{position:relative;display:flex;gap:2.4rem;align-items:center}
.author-hero-av{width:100px;height:100px;border-radius:50%;background:rgba(255,255,255,.15);border:3px solid rgba(255,255,255,.28);display:flex;align-items:center;justify-content:center;font-size:2.5rem;font-weight:800;color:#fff;flex-shrink:0}
.author-hero-content .eyebrow{color:rgba(255,255,255,.5)}
.author-hero-content h1{color:#fff;font-size:clamp(1.6rem,3vw,2.2rem);margin-bottom:.4rem}
.author-hero-content .author-role{font-size:.82rem;color:var(--orange);font-weight:600;margin-bottom:.7rem}
.author-hero-content p{font-size:.87rem;color:rgba(255,255,255,.62);line-height:1.8;max-width:520px;margin-bottom:1.2rem}
.author-stats{display:flex;gap:1.8rem;padding-top:1.2rem;border-top:1px solid rgba(255,255,255,.1)}
.author-stat-num{font-size:1.5rem;font-weight:800;color:#fff;line-height:1}
.author-stat-lbl{font-size:.62rem;color:rgba(255,255,255,.44);margin-top:.1rem}
.author-social{display:flex;gap:.5rem;margin-top:1rem}
.author-social a{width:32px;height:32px;border-radius:6px;border:1.5px solid rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.6);transition:all .2s}
.author-social a:hover{border-color:#fff;color:#fff;background:rgba(255,255,255,.1)}
.author-expertise{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.8rem}
.author-expertise span{font-size:.65rem;font-weight:600;color:rgba(255,255,255,.7);background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);padding:.2rem .55rem;border-radius:3px}

/* ── CATEGORY PAGE ── */
.cat-hero{background:linear-gradient(135deg,#0f1729 0%,#162460 55%,#1a3fc4 100%);padding:3rem 0;position:relative;overflow:hidden}
.cat-hero::before{content:'';position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.025) 1px,transparent 1px);background-size:28px 28px;pointer-events:none}
.cat-hero-inner{position:relative;max-width:700px}
.cat-hero .eyebrow{color:rgba(255,255,255,.5)}
.cat-hero h1{color:#fff;font-size:clamp(1.7rem,3.5vw,2.6rem);margin-bottom:.7rem}
.cat-hero h1 em{color:var(--orange);font-style:normal}
.cat-hero p{font-size:.9rem;color:rgba(255,255,255,.6);line-height:1.8;max-width:520px}
.cat-hero-badge{display:inline-flex;align-items:center;gap:.4rem;background:rgba(249,115,22,.13);border:1px solid rgba(249,115,22,.26);color:#ffa75e;font-size:.65rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;padding:.28rem .75rem;border-radius:40px;margin-bottom:.9rem}
.cat-all-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.3rem;margin-top:2rem}
.cat-overview-card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:1.4rem;transition:all .28s;text-decoration:none;display:block}
.cat-overview-card:hover{border-color:var(--blue);box-shadow:var(--sh-md);transform:translateY(-2px)}
.cat-overview-card .cat-icon{font-size:1.6rem;margin-bottom:.7rem}
.cat-overview-card h3{font-size:.9rem;margin-bottom:.3rem;color:var(--ink);transition:color .18s}
.cat-overview-card:hover h3{color:var(--blue)}
.cat-overview-card p{font-size:.75rem;color:var(--muted);line-height:1.6;margin-bottom:.6rem}
.cat-overview-card .cat-count{font-size:.65rem;font-weight:700;color:var(--blue)}

/* Responsive blog */
@media(max-width:1024px){
  .blog-layout,.article-layout{grid-template-columns:1fr}
  .blog-sidebar{position:static}
  .related-grid{grid-template-columns:repeat(2,1fr)}
  .cat-all-grid{grid-template-columns:repeat(2,1fr)}
  .post-card.featured{flex-direction:column}
  .post-card.featured .post-card-img{width:100%;aspect-ratio:16/9}
}
@media(max-width:768px){
  .related-grid{grid-template-columns:1fr}
  .cat-all-grid{grid-template-columns:1fr}
  .article-body{padding:1.6rem 1.2rem}
  .author-hero-inner{flex-direction:column;text-align:center}
  .author-stats{justify-content:center}
  .author-social,.author-expertise{justify-content:center}
  .author-box{flex-direction: column;}
}



.ud-typography {
  --bc-ink: var(--ink, #141A33);
  --bc-slate: var(--slate, #5A6480);
  --bc-heading: var(--navy-900, #071B58);
  --bc-navy: var(--navy-700, #033C7F);
  --bc-link: var(--navy-600, #0157A1);
  --bc-link-hover: var(--blue-500, #1670C4);
  --bc-yellow: var(--yellow-500, #FAC411);
  --bc-yellow-soft: var(--yellow-400, #FFD23F);
  --bc-orange: var(--orange-500, #F88813);
  --bc-line: var(--line, #DDE4EF);
  --bc-mist: var(--mist, #EDF2FA);
  --bc-paper: var(--paper, #F6F9FD);
  --bc-white: var(--white, #FFFFFF);
  --bc-danger: var(--danger, #C33A3A);
  --bc-display: var(--font-display, 'Poppins', system-ui, sans-serif);
  --bc-body: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif), 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  --bc-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --bc-r: var(--r, 14px);
  --bc-r-sm: 10px;
  --bc-shadow: var(--shadow-sm, 0 1px 2px rgba(7,27,88,.06), 0 4px 12px -6px rgba(7,27,88,.12));
  --bc-space: 1.5em;

  font-family: var(--bc-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--bc-ink);
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ud-typography *,
.ud-typography *::before,
.ud-typography *::after { box-sizing: border-box; }

.ud-typography > *:first-child { margin-top: 0; }
.ud-typography > *:last-child { margin-bottom: 0; }

/* ---------- Headings ---------- */
.ud-typography h1,
.ud-typography h2,
.ud-typography h3,
.ud-typography h4,
.ud-typography h5,
.ud-typography h6 {
  font-family: var(--bc-display);
  font-weight: 600;
  color: var(--bc-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 1.8em 0 0.6em;
  scroll-margin-top: 110px; /* sticky header offset for TOC anchors */
}
.ud-typography h1 { font-size: clamp(30px, 4.2vw, 34px); line-height: 1.1; letter-spacing: -0.03em; }
.ud-typography h2 { font-size: clamp(25px, 3.2vw, 28px); line-height: 1.15; }
.ud-typography h3 { font-size: clamp(21px, 2.4vw, 25px); }
.ud-typography h4 { font-size: 20px; }
.ud-typography h5 { font-size: 18px; }
.ud-typography h6 {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bc-navy);
}
.ud-typography h1 em,
.ud-typography h2 em { font-style: normal; color: var(--bc-link); }

.ud-typography h2 + h3,
.ud-typography h3 + h4 { margin-top: 0.8em; }

/* ---------- Paragraph & inline ---------- */
.ud-typography p { margin: 0 0 var(--bc-space); }

.ud-typography strong,
.ud-typography b { font-weight: 700; color: var(--bc-heading); }
.ud-typography em,
.ud-typography i { font-style: italic; }
.ud-typography u {
  text-decoration: underline;
  text-decoration-color: var(--bc-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.ud-typography mark {
  background: linear-gradient(transparent 55%, var(--bc-yellow-soft) 55%);
  color: inherit;
  padding: 0 0.1em;
}
.ud-typography small { font-size: 0.82em; color: var(--bc-slate); }
.ud-typography sub,
.ud-typography sup { font-size: 0.72em; line-height: 0; position: relative; vertical-align: baseline; }
.ud-typography sup { top: -0.5em; }
.ud-typography sub { bottom: -0.25em; }

.ud-typography code,
.ud-typography kbd,
.ud-typography var,
.ud-typography samp { font-family: var(--bc-mono); font-size: 0.88em; }
.ud-typography code {
  background: var(--bc-mist);
  color: var(--bc-navy);
  padding: 0.15em 0.4em;
  border-radius: 6px;
}
.ud-typography kbd {
  background: var(--bc-white);
  color: var(--bc-heading);
  border: 1px solid var(--bc-line);
  border-bottom-width: 2px;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  white-space: nowrap;
}
.ud-typography var { font-style: italic; color: var(--bc-link); }
.ud-typography abbr[title],
.ud-typography acronym[title] {
  text-decoration: underline dotted var(--bc-slate);
  text-underline-offset: 3px;
  cursor: help;
}
.ud-typography q { quotes: "\201C" "\201D" "\2018" "\2019"; font-style: italic; }
.ud-typography q::before { content: open-quote; }
.ud-typography q::after { content: close-quote; }

/* ---------- Links ---------- */
.ud-typography a {
  color: var(--bc-link);
  text-decoration: underline;
  text-decoration-color: rgba(1, 87, 161, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
  word-break: break-word; /* long URLs */
}
.ud-typography a:hover { color: var(--bc-link-hover); text-decoration-color: currentColor; }
.ud-typography a:focus-visible {
  outline: 2px solid var(--bc-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}
.ud-typography a:has(> img) { text-decoration: none; display: inline-block; }

/* ---------- HR ---------- */
.ud-typography hr {
  border: 0;
  height: 1px;
  background: var(--bc-line);
  margin: 2.5em 0;
}

/* ---------- Blockquote ---------- */
.ud-typography blockquote {
  margin: 2em 0;
  padding: 1.4em 1.6em 1.4em 1.8em;
  background: var(--bc-paper);
  border-left: 4px solid #1a3fc4;
/* var(--bc-yellow);*/
  border-radius: 0 var(--bc-r) var(--bc-r) 0;
  color: var(--bc-heading);
}
.ud-typography blockquote p {
  font-family: var(--bc-display);
  font-size: 1.15em;
  font-weight: 500;
  line-height: 1.55;
  margin-bottom: 0.6em;
}
.ud-typography blockquote p:last-child { margin-bottom: 0; }
.ud-typography blockquote cite,
.ud-typography figcaption cite {
  display: block;
  font-style: normal;
  font-size: 0.88em;
  font-weight: 600;
  color: var(--bc-slate);
}
.ud-typography blockquote p + cite { margin-top: 0.4em; }

/* ---------- Pre / code block ---------- */
.ud-typography pre {
  margin: 0 0 var(--bc-space);
  padding: 1.2em 1.4em;
  background: var(--bc-heading);
  color: #E6ECF7;
  border-radius: var(--bc-r);
  overflow-x: auto;
  font-size: 0.88em;
  line-height: 1.65;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
}
.ud-typography pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
  white-space: pre;
}

/* ---------- Lists ---------- */
.ud-typography ul,
.ud-typography ol {
  margin: 0 0 var(--bc-space);
  padding-left: 1.5em;
}
.ud-typography li { margin-bottom: 0.5em; padding-left: 0.25em; }
.ud-typography li > ul,
.ud-typography li > ol { margin: 0.5em 0 0; }

.ud-typography ul { list-style: none; padding-left: 1.4em; }
.ud-typography ul > li { position: relative; }
.ud-typography ul > li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1a3fc4/*var(--bc-yellow)*/;
}
.ud-typography ul ul > li::before {
  background: transparent;
  border: 1.5px solid var(--bc-link);
}

.ud-typography ol > li::marker {
  font-family: var(--bc-display);
  font-weight: 600;
  color: var(--bc-link);
}
.ud-typography ol ol { list-style-type: lower-alpha; }

/* Definition list */
.ud-typography dl { margin: 0 0 var(--bc-space); }
.ud-typography dt {
  font-family: var(--bc-display);
  font-weight: 600;
  color: var(--bc-heading);
  margin-top: 1em;
}
.ud-typography dt:first-child { margin-top: 0; }
.ud-typography dd {
  margin: 0.25em 0 0;
  padding-left: 1em;
  border-left: 2px solid var(--bc-line);
  color: var(--bc-slate);
}

/* ---------- Tables ---------- */
.ud-typography table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 var(--bc-space);
  font-size: 0.94em;
  line-height: 1.5;
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-r);
  overflow: hidden;
}
.ud-typography th,
.ud-typography td {
  padding: 0.85em 1em;
  text-align: left;
  vertical-align: top;
  border: 0;
  border-bottom: 1px solid var(--bc-line);
}
.ud-typography thead th {
 /* background: var(--bc-heading);
  color: var(--bc-white);
  font-family: var(--bc-display);*/
  background: #1a3fc4;
  color: #E4ECE8;
  font-weight: 600;
  font-size: 0.92em;
}
.ud-typography tbody tr:nth-child(even) { background: var(--bc-paper); }
.ud-typography tbody tr:last-child td,
.ud-typography tbody tr:last-child th { border-bottom: 0; }
.ud-typography tbody th { color: var(--bc-heading); font-weight: 600; }
.ud-typography caption {
  caption-side: bottom;
  padding-top: 0.6em;
  font-size: 0.85em;
  color: var(--bc-slate);
}

/* ---------- Images / media ---------- */
.ud-typography img,
.ud-typography video {
  max-width: 100%;
  height: auto;
  border-radius: var(--bc-r);
  vertical-align: middle;
}
.ud-typography img { display: inline-block; }
.ud-typography img[style*="float:left"],
.ud-typography img[style*="float: left"],
.ud-typography .alignleft { float: left; margin: 0.3em 1.5em 1em 0; max-width: 45%; }
.ud-typography img[style*="float:right"],
.ud-typography img[style*="float: right"],
.ud-typography .alignright { float: right; margin: 0.3em 0 1em 1.5em; max-width: 45%; }
.ud-typography .aligncenter { display: block; margin-left: auto; margin-right: auto; }

.ud-typography figure {
  margin: 2em 0;
}
.ud-typography figure img { display: block; width: 100%; }
.ud-typography figcaption {
  margin-top: 0.7em;
  font-size: 0.86em;
  line-height: 1.55;
  color: var(--bc-slate);
  text-align: center;
}

/* Inline-styled flex galleries */
.ud-typography div[style*="display:flex"] img,
.ud-typography .gallery img {
  flex: 1 1 calc(33.333% - 15px);
  min-width: 140px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.ud-typography audio {
  width: 100%;
  max-width: 560px;
  margin: 0 0 var(--bc-space);
  display: block;
}
.ud-typography video { display: block; width: 100%; margin: 0 0 var(--bc-space); background: #000; }

.ud-typography img,.ud-typography img,.wp-block-image img{max-width:100%;height:auto;display:block}
.ud-typography img.alignnone,.ud-typography img.alignnone{display:block;margin:24px 0}
.ud-typography img.alignleft,.ud-typography img.alignleft{float:left;margin:0 24px 24px 0}
.ud-typography img.alignright,.ud-typography img.alignright{float:right;margin:0 0 24px 24px}
.ud-typography img.aligncenter,.ud-typography img.aligncenter{display:block;margin:24px auto;float:none}
.ud-typography .wp-caption,.ud-typography .wp-caption{max-width:100%;height:auto;margin:24px 0}
.ud-typography .wp-caption.alignnone,.ud-typography .wp-caption.alignnone{display:block;margin:24px 0}
.ud-typography .wp-caption.alignleft,.ud-typography .wp-caption.alignleft{float:left;margin:0 24px 24px 0}
.ud-typography .wp-caption.alignright,.ud-typography .wp-caption.alignright{float:right;margin:0 0 24px 24px}
.ud-typography .wp-caption.aligncenter,.ud-typography .wp-caption.aligncenter{float:none;margin:24px auto}
.ud-typography .wp-caption img,.ud-typography .wp-caption img{display:block;width:100%;max-width:100%;height:auto;margin:0}
.ud-typography .wp-caption-text,.ud-typography .wp-caption-text{font-size:14px;line-height:1.6;color:#666;text-align:center;margin:10px 0 0}
.ud-typography figure,.ud-typography figure{max-width:100%}
.ud-typography::after,.ud-typography::after{content:"";display:table;clear:both}
@media (max-width:767px){
.ud-typography .wp-caption.alignleft,.ud-typography .wp-caption.alignright,.ud-typography img.alignleft,.ud-typography img.alignright,.ud-typography .wp-caption.alignleft,.ud-typography .wp-caption.alignright,.ud-typography img.alignleft,.ud-typography img.alignright{float:none;display:block;margin:24px auto}
}



/* Embeds: YouTube / Vimeo / WP */
.ud-typography iframe {
  display: block;
  max-width: 100%;
  border: 0;
  border-radius: var(--bc-r);
  margin: 0 0 var(--bc-space);
}
.ud-typography iframe[src*="youtube"],
.ud-typography iframe[src*="youtu.be"],
.ud-typography iframe[src*="vimeo"] {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
.ud-typography iframe:not([src*="youtube"]):not([src*="vimeo"]) {
  width: 100%;
  border: 1px solid var(--bc-line);
}

/* Twitter/X fallback (before widgets.js renders) */
.ud-typography blockquote.twitter-tweet {
  max-width: 550px;
  background: var(--bc-white);
  border: 1px solid var(--bc-line);
  border-left: 1px solid var(--bc-line);
  border-radius: var(--bc-r);
  box-shadow: var(--bc-shadow);
}
.ud-typography blockquote.twitter-tweet p {
  font-family: var(--bc-body);
  font-size: 1em;
  font-weight: 400;
  color: var(--bc-ink);
}

/* ---------- Buttons ---------- */
.ud-typography button,
.ud-typography .button,
.ud-typography input[type="button"],
.ud-typography input[type="submit"],
.ud-typography input[type="reset"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--bc-body);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 22px;
  margin: 0 0.5em 0.5em 0;
  color: var(--bc-white);
  background: var(--bc-navy);
  border: 1px solid var(--bc-navy);
  border-radius: var(--bc-r-sm);
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.ud-typography button:hover,
.ud-typography .button:hover,
.ud-typography input[type="button"]:hover,
.ud-typography input[type="submit"]:hover {
  background: var(--bc-heading);
  border-color: var(--bc-heading);
  color: var(--bc-white);
  transform: translateY(-1px);
}
.ud-typography button:focus-visible,
.ud-typography .button:focus-visible,
.ud-typography input[type="button"]:focus-visible,
.ud-typography input[type="submit"]:focus-visible {
  outline: 2px solid var(--bc-yellow);
  outline-offset: 2px;
}
.ud-typography button:disabled,
.ud-typography input:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Forms ---------- */
.ud-typography form { margin: 0 0 var(--bc-space); }
.ud-typography label {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--bc-heading);
}
.ud-typography input[type="text"],
.ud-typography input[type="email"],
.ud-typography input[type="password"],
.ud-typography input[type="tel"],
.ud-typography input[type="url"],
.ud-typography input[type="number"],
.ud-typography input[type="search"],
.ud-typography select,
.ud-typography textarea {
  width: 100%;
  max-width: 100%;
  margin-top: 0.35em;
  padding: 11px 14px;
  font-family: var(--bc-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--bc-ink);
  background: var(--bc-white);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-r-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.ud-typography textarea { resize: vertical; min-height: 120px; }
.ud-typography select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23071B58' stroke-width='1.6' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.ud-typography input:focus,
.ud-typography select:focus,
.ud-typography textarea:focus {
  outline: none;
  border-color: var(--bc-link);
  box-shadow: 0 0 0 3px rgba(1, 87, 161, 0.15);
}
.ud-typography input[type="checkbox"],
.ud-typography input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 0.4em 0 0;
  vertical-align: -3px;
  accent-color: var(--bc-navy);
}
.ud-typography label:has(input[type="checkbox"]),
.ud-typography label:has(input[type="radio"]) {
  font-weight: 400;
  color: var(--bc-ink);
  margin-right: 1.2em;
  cursor: pointer;
}
.ud-typography ::placeholder { color: var(--bc-slate); opacity: .7; }

/* ---------- Address ---------- */
.ud-typography address {
  font-style: normal;
  margin: 0 0 var(--bc-space);
  padding: 1em 1.2em;
  background: var(--bc-paper);
  border: 1px solid var(--bc-line);
  border-radius: var(--bc-r);
  line-height: 1.65;
}

/* ---------- Clearfix for floats ---------- */
.ud-typography::after { content: ""; display: table; clear: both; }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .ud-typography { font-size: 16px; line-height: 1.7; }
  .ud-typography h4 { font-size: 18px; }
  .ud-typography h5 { font-size: 17px; }

  /* Floats stack on mobile */
  .ud-typography img[style*="float"],
  .ud-typography .alignleft,
  .ud-typography .alignright {
    float: none !important;
    display: block;
    max-width: 100%;
    margin: 0 auto 1.2em !important;
  }

  .ud-typography blockquote { padding: 1.1em 1.2em 1.1em 1.3em; }
  .ud-typography pre { border-radius: var(--bc-r-sm); }

  /* Scrollable tables */
  .ud-typography table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .ud-typography div[style*="display:flex"] img { flex-basis: calc(50% - 15px); }

  .ud-typography button,
  .ud-typography .button,
  .ud-typography input[type="submit"] { width: 100%; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ud-typography * { transition: none !important; }
}