/* WordPress integration for the approved 2026 redesign. */
body.codex-v3-active {
  margin: 0 !important;
  background: var(--ivory) !important;
  color: var(--text) !important;
  font-family: var(--sans) !important;
  overflow-x: clip;
}

/* Keep the V3 header independent from Hello Elementor's generic header rules. */
.codex-v3-shell > .site-header {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

body.admin-bar .codex-v3-shell .site-header { top: 32px; }
.codex-v3-shell { min-height: 100vh; overflow: clip; background: var(--ivory); }
.codex-v3-shell :where(h1, h2, h3, h4, p, ul, ol, figure) { text-transform: none; }
.codex-v3-shell :where(h1, h2, h3, h4) { color: var(--ink); font-family: var(--serif); font-weight: 500; }
.codex-v3-shell .site-header a,
.codex-v3-shell .footer a,
.codex-v3-shell main a { text-decoration: none; }
.codex-v3-shell .codex-v3-main { min-height: 55vh; }
.codex-v3-shell .codex-v3-home-existing .h2-urgency { display: none !important; }
.codex-v3-shell .codex-v3-home-existing .js-home-v2,
.codex-v3-shell .codex-v3-profile-existing .js-profile-v2 { margin-top: 0 !important; }
.codex-v3-shell .codex-v3-home-existing .js-home-v2 { width: 100% !important; margin-left: 0 !important; }
.codex-v3-shell .codex-v3-profile-existing .js-profile-v2 { width: 100% !important; margin-left: 0 !important; }

.codex-office-gallery { background: #edf2f2; }
.office-gallery-heading { margin-bottom: 46px; }
.office-gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.office-gallery-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 16px 42px rgba(6,28,38,.07); }
.office-gallery-card img { width: 100%; aspect-ratio: 2.2 / 1; display: block; object-fit: cover; }
.office-gallery-meeting img { object-position: 55% 50%; }
.office-gallery-team img { object-position: 48% 50%; }
.office-gallery-card figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 20px 22px; }
.office-gallery-card figcaption strong { color: var(--ink); font-family: var(--serif); font-size: 21px; font-weight: 500; }
.office-gallery-card figcaption span { color: var(--muted); font-size: 13px; text-align: right; }

.codex-card-marks { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 34px; }
.codex-card-marks .card-number,
.codex-card-marks .h2-card-number { margin-bottom: 0 !important; }
.codex-card-marks .card-icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: rgba(11,113,133,.09); color: var(--teal-dark); }
.codex-card-marks .card-icon svg { width: 28px; height: 28px; }
.situation-card.accent .card-icon,
.js-home-v2 .h2-situation-card.h2-accent .card-icon { background: rgba(11,113,133,.13); }

.codex-map-section { background: var(--paper); scroll-margin-top: 120px; }
.codex-map-grid { display: grid; grid-template-columns: minmax(280px,.72fr) minmax(0,1.28fr); align-items: center; gap: clamp(42px,7vw,90px); }
.codex-map-copy h2 { max-width: 620px; margin-bottom: 22px; font-size: clamp(38px,4.5vw,58px); line-height: 1.06; letter-spacing: -.04em; }
.codex-map-copy > p:not(.eyebrow) { max-width: 620px; color: #3b4b52; font-size: 17px; line-height: 1.72; }
.codex-map-address { max-width: 600px; margin: 25px 0 28px; padding: 18px 20px; border-left: 3px solid var(--teal); background: #edf2f2; color: var(--ink); font-size: 15px; font-style: normal; font-weight: 720; line-height: 1.55; }
.codex-map-facts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 28px; }
.codex-map-fact { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); }
.codex-map-fact > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(11,113,133,.09); color: var(--teal-dark); }
.codex-map-fact svg { width: 21px; height: 21px; }
.codex-map-fact div { min-width: 0; display: grid; gap: 1px; }
.codex-map-fact small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.codex-map-fact strong { color: var(--ink); font-size: 13px; overflow-wrap: anywhere; }
.codex-map-route { gap: 10px; color: #fff !important; }
.codex-map-route:visited,
.codex-map-route:hover,
.codex-map-route:focus { color: #fff !important; }
.codex-map-route > span { width: 22px; height: 22px; display: grid; place-items: center; }
.codex-map-route svg { width: 22px; height: 22px; }
.codex-map-frame { position: relative; min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #e5edef; box-shadow: 0 18px 52px rgba(6,28,38,.09); }
.codex-map-frame > :not(.codex-map-tag),
.codex-map-frame iframe,
.codex-map-frame .cmplz-consent-area { width: 100%; min-height: 420px; }
.codex-map-frame iframe { display: block; border: 0; }
.codex-map-frame .cmplz-consent-area iframe { height: 420px; }
.codex-map-tag { position: absolute; z-index: 3; left: 18px; bottom: 18px; padding: 10px 13px; border-radius: 999px; background: rgba(7,40,52,.92); color: #fff; font-size: 12px; font-weight: 750; box-shadow: 0 9px 22px rgba(6,28,38,.22); pointer-events: none; }
.codex-map-consent-fallback { min-height: 420px; display: grid; place-items: center; align-content: center; gap: 14px; padding: 42px; text-align: center; }
.codex-map-fallback-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: rgba(11,113,133,.11); color: var(--teal-dark); }
.codex-map-fallback-icon svg { width: 28px; height: 28px; }
.codex-map-consent-fallback p { max-width: 460px; margin: 0; color: #3b4b52; line-height: 1.65; }
.codex-map-consent-fallback a { color: var(--teal-dark); font-weight: 750; text-decoration: underline !important; text-underline-offset: 4px; }

.codex-contact { background: #e5edef; }
.codex-contact .service-contact-grid { padding-top: 86px; padding-bottom: 45px; }
.codex-address { max-width: 540px; color: var(--muted); font-size: 14px; }
.codex-live-form { padding-bottom: 88px; }
.codex-form-only .codex-live-form { padding-top: 82px; }
.codex-live-form .elementor-widget-form { max-width: 820px; margin: 0 auto; padding: clamp(24px, 4vw, 44px); border: 1px solid rgba(10,38,51,.13); border-radius: 18px; background: var(--paper); box-shadow: 0 18px 50px rgba(6,28,38,.09); }
.codex-live-form .elementor-form-fields-wrapper { display: flex; flex-wrap: wrap; gap: 16px 0; }
.codex-live-form .elementor-field-group { padding: 0 8px !important; }
.codex-live-form :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) { width: 100%; min-height: 50px; padding: 12px 14px !important; border: 1px solid rgba(10,38,51,.25) !important; border-radius: 7px !important; background: #fff !important; color: var(--text) !important; box-shadow: none !important; }
.codex-live-form textarea { min-height: 140px; }
.codex-live-form label { color: var(--ink) !important; font-size: 14px !important; font-weight: 700 !important; }
.codex-live-form button[type="submit"] { min-height: 52px; padding: 13px 24px !important; border: 1px solid var(--teal) !important; border-radius: 9px !important; background: var(--teal) !important; color: #fff !important; font-size: 15px !important; font-weight: 750 !important; }
.codex-live-form .elementor-message { margin: 16px 8px 0; }

.codex-blog-hero,
.codex-editorial-hero { padding: 44px 0 82px; background: radial-gradient(circle at 88% 18%,rgba(185,149,98,.14),transparent 28%),linear-gradient(180deg,var(--ivory),#f3f0e9); }
.codex-blog-hero h1,
.codex-editorial-hero h1 { max-width: 900px; margin-bottom: 22px; font-size: clamp(45px,5.2vw,68px); line-height: 1.08; letter-spacing: -.045em; }
.codex-blog-hero > .container > p:last-child,
.codex-editorial-lead { max-width: 780px; margin: 0; color: #3a4b52; font-size: clamp(18px,1.8vw,21px); }
.codex-blog-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.codex-blog-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); box-shadow: 0 12px 35px rgba(6,28,38,.05); }
.codex-blog-image { height: 235px; display: grid; place-items: center; overflow: hidden; background: var(--ink); color: #fff; font-family: var(--serif); font-size: 50px; }
.codex-blog-image img { width: 100%; height: 100%; object-fit: cover; }
.codex-blog-card > div { display: flex; flex: 1; flex-direction: column; padding: 28px; }
.codex-blog-card h2 { margin: 0 0 15px; font-size: 28px; line-height: 1.17; letter-spacing: -.02em; }
.codex-blog-card p:not(.eyebrow) { color: var(--muted); }
.codex-blog-card .text-link { margin-top: auto; }
.codex-pagination { margin-top: 48px; }
.codex-pagination ul { display: flex; justify-content: center; gap: 8px; padding: 0; list-style: none; }
.codex-pagination a,
.codex-pagination span { min-width: 42px; min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.codex-pagination .current { border-color: var(--teal); background: var(--teal); color: #fff; }

.codex-legal-card { max-width: 920px; padding: clamp(28px,6vw,70px); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 20px 60px rgba(6,28,38,.07); }
.codex-legal-card h2 { margin: 1.7em 0 .55em; font-size: clamp(30px,3.5vw,42px); line-height: 1.15; }
.codex-legal-card h2:first-child { margin-top: 0; }
.codex-legal-card h3 { margin: 1.5em 0 .5em; font-size: 26px; }
.codex-legal-card p,
.codex-legal-card li { line-height: 1.8; }
.codex-legal-card a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.codex-not-found .service-hero { min-height: 62vh; display: flex; align-items: center; }

.guide-content .codex-article-body > :first-child { margin-top: 0; }
.guide-content .codex-article-body h2 { margin: 2.1em 0 .65em; font-size: clamp(30px,3.2vw,42px); line-height: 1.15; }
.guide-content .codex-article-body h3 { margin: 1.7em 0 .55em; font-size: 26px; }
.guide-content .codex-article-body p,
.guide-content .codex-article-body li { color: #33464e; line-height: 1.82; }
.guide-content .codex-article-body a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 940px) {
  body.admin-bar .codex-v3-shell .site-header { top: 46px; }
  .codex-v3-shell > .site-header {
    position: relative;
    top: 0 !important;
    background: var(--ivory);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .codex-blog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .codex-map-grid { grid-template-columns: 1fr; }
  .codex-map-copy { max-width: 720px; }
}

@media (max-width: 760px) {
  .codex-v3-shell .container { width: min(100% - 32px, 620px); }
  .codex-blog-grid { grid-template-columns: 1fr; }
  .codex-blog-image { height: 220px; }
  .codex-blog-hero,
  .codex-editorial-hero { padding: 30px 0 60px; }
  .codex-contact .service-contact-grid { padding-top: 62px; }
  .codex-live-form { padding-bottom: 62px; }
  .codex-live-form .elementor-widget-form { padding: 22px 14px; }
  .codex-live-form .elementor-field-group { width: 100% !important; }
  .office-gallery-grid { grid-template-columns: 1fr; }
  .office-gallery-card img { aspect-ratio: 16 / 9; }
  .office-gallery-card figcaption { align-items: flex-start; flex-direction: column; gap: 4px; }
  .office-gallery-card figcaption span { text-align: left; }
  .codex-card-marks .card-icon { width: 46px; height: 46px; }
  .codex-card-marks .card-icon svg { width: 25px; height: 25px; }
  .codex-map-copy h2 { font-size: clamp(35px,11vw,48px); }
  .codex-map-frame,
  .codex-map-frame > :not(.codex-map-tag),
  .codex-map-frame iframe,
  .codex-map-frame .cmplz-consent-area,
  .codex-map-consent-fallback { min-height: 340px; }
  .codex-map-frame .cmplz-consent-area iframe { height: 340px; }
  .codex-map-consent-fallback { padding: 34px 22px; }
}

@media (max-width: 782px) {
  body.admin-bar .codex-v3-shell .site-header { top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .codex-v3-shell *, .codex-v3-shell *::before, .codex-v3-shell *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

