/* ---------- Article and news body (WordPress content) ---------- */
.kp-prose{font-size:18px;line-height:1.85;color:#2F3A48;overflow-wrap:break-word}
.kp-prose>*{margin:0 0 24px}
.kp-prose>*:last-child{margin-bottom:0}
.kp-prose h2{margin:36px 0 16px;font-size:26px;line-height:1.3;font-weight:600;color:#001B40}
.kp-prose h3{margin:30px 0 12px;font-size:21px;line-height:1.35;font-weight:600;color:#001B40}
.kp-prose h4{margin:24px 0 10px;font-size:18px;font-weight:600;color:#001B40}
.kp-prose a{color:#A3531F;font-weight:600;text-decoration:underline;text-underline-offset:3px}
.kp-prose strong{color:#1F2A37;font-weight:600}
.kp-prose ul,.kp-prose ol{padding-left:26px}
.kp-prose li{margin:0 0 10px}
.kp-prose li::marker{color:#B8652F}
.kp-prose blockquote{margin:32px 0;padding:6px 0 6px 28px;border-left:3px solid #B8652F;font-size:22px;line-height:1.5;font-style:italic;color:#001B40}
.kp-prose blockquote p{margin:0 0 10px}
.kp-prose blockquote cite{display:block;font-size:14px;font-style:normal;font-weight:600;color:#A3531F}
.kp-prose img{max-width:100%;height:auto;border-radius:10px}
.kp-prose figure{margin:32px 0}
.kp-prose figcaption{margin-top:10px;font-size:14px;line-height:1.5;color:#5B6573}
.kp-prose hr{border:0;border-top:1px solid #E3E6EB;margin:36px 0}
.kp-prose table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.5}
.kp-prose th,.kp-prose td{padding:10px 12px;border-bottom:1px solid #E3E6EB;text-align:left;vertical-align:top}
.kp-prose th{color:#001B40;font-weight:600;background:#F7F8FA}
.kp-prose .wp-block-table{overflow-x:auto}
.kp-prose iframe{max-width:100%}
.kp-prose-news{font-size:17px;line-height:1.8;color:#3E4957}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
#kp-burger{display:none}
a[href^="mailto:"]{overflow-wrap:anywhere}

/* ---------- Tablets and phones ---------- */
@media (max-width:1024px){
  .kp-root{width:auto!important;max-width:100%}
  /* Header */
  .kp-root>div:first-child{padding:0 16px!important}
  #kp-menu>div:first-child{height:auto!important;min-height:64px;padding:10px 16px!important;flex-wrap:wrap}
  #kp-menu a[aria-label="Keel Pragma home"] img{width:198px!important;height:auto!important}
  #kp-burger{display:flex;margin-left:auto;padding:8px;background:none;border:0;cursor:pointer}
  #kp-nav{display:none!important}
  body.kp-nav-open #kp-nav{display:flex!important;flex-direction:column;align-items:stretch!important;width:100%;margin:10px 0 4px!important;gap:0!important}
  #kp-nav .kp-nav{height:46px!important;padding:0 4px!important;border-top:1px solid #EEF0F3;justify-content:space-between}
  body:not(.kp-nav-open) .kp-dd{display:none!important}
  .kp-dd>div{position:static!important;width:auto!important;margin:0 16px 14px;box-shadow:none!important;padding:18px 16px!important}
  .kp-dd>div[style*="display: grid"]{display:flex!important;flex-direction:column;gap:18px!important}
  .kp-dd>div>div[style*="grid-template-columns"]{display:flex!important;flex-direction:column}

  /* Sections: full width, comfortable side margins */
  main section,footer{padding-left:20px!important;padding-right:20px!important}
  main section{height:auto!important;padding-top:52px!important;padding-bottom:52px!important}
  main section[style*="96px 0"]{padding-bottom:0!important}
  main section[style*="padding: 36px 96px"]{padding-top:28px!important}
  main section[style*="padding: 0 96px"]{min-height:220px}

  /* Grids collapse to one column */
  main [style*="grid-template-columns"],footer [style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr)!important;column-gap:0!important}
  main [style*="grid-column"]{grid-column:auto!important}
  main [style*="justify-self: end"]{justify-self:start!important}
  main [style*="calc((100% - 60px) / 4)"]{width:100%!important}

  /* Rows that become stacks */
  main section[style*="justify-content: space-between"]{flex-direction:column;align-items:flex-start!important}
  main [style*="display: flex"][style*="justify-content: space-between"]{flex-wrap:wrap}
  main h1[style*="white-space: nowrap"]{width:auto!important;align-items:flex-start!important;min-height:0!important}
  main h1 span[style*="display: flex"]{flex-wrap:wrap}
  main section[aria-label="Introduction"]>div>img,main section[aria-label="Introduction"] img[style*="width: 480px"]{display:none!important}
  main section[aria-label="Introduction"]{padding-top:56px!important;padding-bottom:56px!important}
  main img[style*="width: 1248px"]{height:auto!important;margin:0!important}
  main [style*="left: calc((100% - 120px) / 8)"]{display:none}
  main section[aria-label="Standards and frameworks"] [style*="gap: 64px"]{gap:14px!important;flex-wrap:nowrap}
  main section[aria-label="Standards and frameworks"] img{width:96px!important;height:auto!important}
  main section:not([style*="background: #1B3A63"]):not([style*="background: #B8652F"])>img[aria-hidden="true"][style*="position: absolute"]{display:none!important}
  main section[aria-label="Credentials"]{row-gap:18px!important;padding-bottom:40px!important}
  main section[aria-label="Credentials"]>div{padding:0!important}
  footer [style*="justify-content: space-between"]{flex-wrap:wrap;height:auto!important;padding:20px 0}

  /* Fixed widths */
  main [style*="width: 380px"],main [style*="width: 390px"],main [style*="width: 400px"],main [style*="width: 1248px"],main [style*="width: 560px"]{width:100%!important;max-width:100%}
  main section>img[aria-hidden="true"][style*="position: absolute"],main section>div>img[aria-hidden="true"][style*="position: absolute"]{width:200px!important;height:auto!important;right:0!important;opacity:.14!important}
  main img[aria-hidden="true"][style*="width: 440px"]:not([style*="position: absolute"]),main img[style*="width: 520px"]{width:80%!important;height:auto!important}
  main .kp-news-panel{height:220px!important}
  main [style*="white-space: nowrap"]{white-space:normal!important}
  main [style*="border-right: 1px solid"]{border-right:0!important;padding-left:0!important;padding-right:0!important}
  main [style*="align-items: center; text-align: center"]{align-items:flex-start!important;text-align:left!important}

  /* Spacing and type */
  main [style*="gap: 80px"],main [style*="gap: 72px"],main [style*="gap: 64px"],main [style*="gap: 56px"]{gap:32px!important}
  main [style*="gap: 48px"],footer [style*="gap: 48px"]{gap:28px!important}
  main [style*="font-size: 46px"],main [style*="font-size: 44px"]{font-size:32px!important}
  main [style*="font-size: 42px"],main [style*="font-size: 40px"]{font-size:30px!important}
  main [style*="font-size: 38px"],main [style*="font-size: 36px"]{font-size:27px!important}
  main [style*="font-size: 32px"],main [style*="font-size: 30px"]{font-size:24px!important}
  main [style*="padding: 44px 48px"],main [style*="padding: 40px 44px"]{padding:26px 22px!important}
  .kp-prose{font-size:17px}
  .kp-prose blockquote{font-size:19px}

  /* AI Controls services visual: stack the four cards */
  main [aria-label^="Four AI controls"]{height:auto!important;overflow:visible!important}
  main [aria-label^="Four AI controls"]>div{position:static!important;transform:none!important;width:auto!important;height:auto!important;display:flex;flex-direction:column;gap:16px}
  main [aria-label^="Four AI controls"]>div>svg{display:none}
  main [aria-label^="Four AI controls"]>div>div{position:static!important;width:100%!important;height:auto!important;flex-wrap:nowrap}
}
@media (min-width:641px) and (max-width:1024px){
  main [style*="repeat(3, minmax(0, 1fr))"],main [style*="repeat(4, minmax(0, 1fr))"],main [style*="repeat(2, minmax(0, 1fr))"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:24px!important}
  main [style*="calc((100% - 60px) / 4)"]{width:calc(50% - 10px)!important}
}
