/*
Theme Name: MBECO Negotiation
Theme URI: https://mbeco.fi
Author: MBECO
Description: Three-language block theme for MBECO negotiation training.
Version: 5.4
Requires at least: 6.4
Text Domain: mbeco
*/
:root{--teal:#008eaa;--navy:#13283b;--orange:#eeae55;--muted:#5c6974;--pale:#eef9fb}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--navy);font-family:Inter,Arial,sans-serif;background:#fff}a{color:var(--teal)}.mbeco-shell{max-width:1180px;margin:auto;padding:0 28px}.mbeco-header{border-bottom:1px solid #e5eef0;background:#fff;position:relative;z-index:2}.mbeco-header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 28px}.mbeco-brand{display:flex;align-items:center;text-decoration:none;color:var(--navy);gap:10px}.mbeco-brand img{width:170px;max-width:42vw;height:65px;object-fit:contain;object-position:left center}.mbeco-nav{display:flex;gap:24px;align-items:center;flex-wrap:wrap}.mbeco-nav a{text-decoration:none;color:var(--navy);font-weight:600;font-size:14px}.mbeco-nav a:hover{color:var(--teal)}.mbeco-lang{display:flex;gap:5px}.mbeco-lang button{cursor:pointer;border:1px solid #cbdfe5;background:white;color:var(--navy);border-radius:6px;padding:7px 10px;font-weight:700}.mbeco-lang button[aria-pressed=true]{background:var(--teal);color:white;border-color:var(--teal)}.mbeco-hero{background:linear-gradient(115deg,#edf9fa 0%,#fff 70%);padding:78px 0 85px}.mbeco-hero-grid{display:grid;grid-template-columns:1.15fr .85fr;align-items:center;gap:64px}.mbeco-eyebrow{font-size:13px;letter-spacing:.16em;text-transform:uppercase;color:var(--teal);font-weight:800;margin:0 0 17px}.mbeco-hero h1{font-size:clamp(38px,5vw,68px);line-height:1.08;letter-spacing:-.045em;margin:0 0 24px;font-weight:800}.mbeco-lead{font-size:19px;line-height:1.7;color:#445765;max-width:640px}.mbeco-portrait{height:490px;max-width:100%;border-radius:20px;background-image:url(assets/magnus.jpg);background-size:cover;background-position:50% 32%;box-shadow:24px 24px 0 #d9f1f4}.mbeco-button{display:inline-block;background:var(--teal);color:white!important;padding:14px 22px;border-radius:7px;text-decoration:none;font-weight:750;margin-top:18px}.mbeco-button:hover{background:#006e85}.mbeco-section{padding:82px 0}.mbeco-section.alt{background:#f5fafb}.mbeco-section h2{font-size:clamp(29px,3.5vw,43px);letter-spacing:-.025em;margin:0 0 20px}.mbeco-intro{color:var(--muted);font-size:18px;line-height:1.7;max-width:790px}.mbeco-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:34px}.mbeco-tile{border:1px solid #dfeaec;border-radius:12px;background:white;padding:25px}.mbeco-tile h3{margin:0 0 12px;font-size:19px}.mbeco-tile p{color:var(--muted);line-height:1.6;margin:0}.mbeco-score-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin:32px 0}.mbeco-score{background:white;border:1px solid #e0ecee;border-radius:12px;padding:24px}.mbeco-score strong{font-size:36px;color:var(--teal)}.mbeco-score span{display:block;color:var(--muted);font-size:14px;margin-top:9px}.mbeco-recommend{font-size:24px;font-weight:700;margin:16px 0}.mbeco-recommend strong{font-size:45px;color:var(--teal)}.mbeco-quotes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin-top:30px}.mbeco-quote{background:#fff;border-left:4px solid var(--orange);padding:23px 25px;border-radius:0 12px 12px 0}.mbeco-quote h3{margin:0 0 13px;font-size:17px}.mbeco-quote blockquote{font-style:italic;line-height:1.65;color:#405563;margin:0 0 12px}.mbeco-about{display:grid;grid-template-columns:1fr 1fr;gap:55px;align-items:center}.mbeco-about-photo{background:url(assets/magnus.jpg) center 30%/cover;border-radius:16px;min-height:380px}.mbeco-about p{line-height:1.8;color:var(--muted)}.mbeco-contact-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:55px}.mbeco-form{display:grid;gap:14px}.mbeco-form label{display:block;font-size:14px;font-weight:700;margin-bottom:6px}.mbeco-form input,.mbeco-form textarea{width:100%;font:inherit;border:1px solid #c8dadd;border-radius:6px;padding:12px 13px;background:#fff}.mbeco-form textarea{min-height:135px}.mbeco-form button{cursor:pointer;border:0;border-radius:6px;background:var(--teal);color:white;padding:14px 20px;font:inherit;font-weight:700}.mbeco-form small{color:var(--muted)}.mbeco-alert{padding:12px;border-radius:7px;background:#edf8f4;color:#19553f}.mbeco-alert.error{background:#fff0ef;color:#8b2828}.mbeco-footer{background:#122a3c;color:#e4f2f5;padding:38px 0}.mbeco-footer a{color:#bcebf3}.mbeco-footer-inner{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}.mbeco-hidden{display:none!important}.mbeco-custom-content{padding:30px 0}.mbeco-fineprint{font-size:13px;color:var(--muted);line-height:1.6}@media(max-width:850px){.mbeco-hero-grid,.mbeco-about,.mbeco-contact-grid{grid-template-columns:1fr}.mbeco-grid{grid-template-columns:repeat(2,1fr)}.mbeco-hero{padding:50px 0}.mbeco-portrait{height:410px;box-shadow:12px 12px 0 #d9f1f4}.mbeco-header-inner{flex-wrap:wrap}.mbeco-nav{gap:13px}.mbeco-score-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:570px){.mbeco-shell{padding:0 19px}.mbeco-section{padding:58px 0}.mbeco-grid,.mbeco-quotes{grid-template-columns:1fr}.mbeco-header-inner{padding:10px 19px}.mbeco-brand img{width:138px;height:55px}.mbeco-nav{gap:11px}.mbeco-nav a{font-size:13px}.mbeco-score{padding:16px}.mbeco-score strong{font-size:29px}}

/* Resilient styling for the WordPress site editor preview */
.editor-styles-wrapper .mbeco-brand img, .mbeco-brand img {width:170px!important;max-width:170px!important;height:65px!important;object-fit:contain!important;}
.editor-styles-wrapper .mbeco-header-inner {display:flex!important;align-items:center!important;justify-content:space-between!important;}
.editor-styles-wrapper .mbeco-hero-grid {display:grid!important;grid-template-columns:1.15fr .85fr!important;}
@media(max-width:850px){.editor-styles-wrapper .mbeco-hero-grid{grid-template-columns:1fr!important}}

/* v1.1: full-width shortcode section, readable trainer and reliable language toggle */
.mbeco-contact-section{width:100%;} .mbeco-about h3{font-size:clamp(25px,3vw,36px);margin:0 0 16px}.mbeco-about p{font-size:18px;line-height:1.75}.mbeco-about-photo{min-height:480px;background-position:center 28%}.mbeco-about a{font-weight:700}.mbeco-tile{transition:transform .18s,box-shadow .18s}.mbeco-tile:hover{transform:translateY(-3px);box-shadow:0 10px 25px rgba(19,40,59,.07)}.mbeco-header .mbeco-nav a.mbeco-hidden{display:none!important}.mbeco-form{padding:26px;border:1px solid #dfeaec;border-radius:14px;background:#fff}.mbeco-form button:hover{background:#006e85}.mbeco-contact-section .mbeco-intro{max-width:400px}@media(max-width:850px){.mbeco-about-photo{min-height:420px}}@media(max-width:570px){.mbeco-form{padding:18px}.mbeco-about-photo{min-height:340px}}

.mbeco-language-note{color:#526775;font-size:15px;line-height:1.6;border-left:3px solid var(--orange);padding-left:14px;margin:18px 0;}

/* v1.3 business impact */
.mbeco-impact{background:linear-gradient(180deg,#f3fafb,#fff)}.mbeco-impact .mbeco-intro{max-width:900px}.mbeco-value-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:35px}.mbeco-value-card{padding:27px;border:1px solid #dcebed;border-radius:14px;background:#fff;border-top:4px solid #eeae55}.mbeco-value-card h3{font-size:20px;margin:0 0 12px}.mbeco-value-card p{color:#526775;line-height:1.65;margin:0}.mbeco-credentials{font-size:17px;line-height:1.7;color:#405563;background:#f2fafb;border-left:4px solid #008eaa;padding:18px 24px;margin-top:25px!important;border-radius:0 9px 9px 0}@media(max-width:850px){.mbeco-value-grid{grid-template-columns:1fr}}

/* v1.6: quiet visual accents echoing the orange strokes in the MBECO logo */
.mbeco-header{overflow:hidden}.mbeco-header::after{content:"";pointer-events:none;position:absolute;right:6px;top:10px;width:65px;height:55px;opacity:.7;background:repeating-linear-gradient(126deg,transparent 0 15px,#eeae55 15px 16.5px,transparent 16.5px 25px);mask-image:linear-gradient(to left,#000,transparent)}
.mbeco-footer{position:relative;overflow:hidden}.mbeco-footer::after{content:"";position:absolute;right:12px;bottom:0;width:105px;height:92px;pointer-events:none;opacity:.48;background:repeating-linear-gradient(126deg,transparent 0 17px,#eeae55 17px 18.5px,transparent 18.5px 29px);mask-image:linear-gradient(to left,#000,transparent)}
.mbeco-editorial-image{margin:29px 0 8px;max-width:960px;overflow:hidden;border-radius:15px;border:1px solid #e1edef;background:#edf7f8}.mbeco-editorial-image img{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:cover}
@media(max-width:1100px){.mbeco-header::after{display:none}}@media(max-width:570px){.mbeco-editorial-image{margin:24px 0 4px;border-radius:10px}.mbeco-editorial-image img{aspect-ratio:2/1;object-fit:cover}}

/* v1.7: clean email-only contact section */
.mbeco-email-contact{max-width:960px}.mbeco-email-contact .mbeco-button{display:inline-flex;align-items:center;justify-content:center;margin:12px 0 6px}.mbeco-email-contact>p:last-child{margin-top:12px}

/* v2.0: editable native WordPress contact blocks */
.mbeco-contact-section .mbeco-shell{max-width:1180px;margin-left:auto;margin-right:auto;width:100%}.mbeco-contact-section .wp-block-buttons{margin:12px 0 20px}.mbeco-contact-section .wp-block-button__link{display:inline-block;background:var(--teal);color:#fff;border-radius:7px;padding:14px 22px;font-weight:750;text-decoration:none}.mbeco-contact-section .wp-block-button__link:hover{background:#006e85}.mbeco-contact-section .mbeco-intro{max-width:650px}.mbeco-contact-section .mbeco-email-contact>p:last-child{margin-top:12px}

/* v2.3: restrained chess-inspired course board */
.mbeco-chess-layout{display:grid;grid-template-columns:54px minmax(0,1fr) 54px;gap:14px;align-items:center;margin:28px 0 34px;max-width:1180px}
.mbeco-chess-board{margin:0!important;gap:14px!important;min-width:0}
.mbeco-chess-board .mbeco-tile{min-width:0;box-sizing:border-box;transition:background-color .2s ease}
.mbeco-chess-board .mbeco-tile:nth-child(2n+1){background:#eaf0f5}
.mbeco-chess-board .mbeco-tile:nth-child(2n){background:#fff}
.mbeco-chess-pieces{display:flex;flex-direction:column;justify-content:space-around;align-items:center;gap:32px;align-self:stretch;padding:24px 0;font-family:Georgia,'DejaVu Sans',serif;font-size:51px;line-height:1;user-select:none;pointer-events:none}
.mbeco-chess-left{color:#17314b}.mbeco-chess-right{color:#d7853e}
.mbeco-chess-pieces span{display:block;filter:drop-shadow(0 2px 1px rgba(18,40,58,.08))}
@media(max-width:850px){.mbeco-chess-layout{grid-template-columns:34px minmax(0,1fr) 34px;gap:7px}.mbeco-chess-pieces{font-size:33px;gap:18px}}
@media(max-width:570px){.mbeco-chess-layout{display:flex;flex-direction:column;gap:10px;margin:22px 0}.mbeco-chess-board{width:100%;grid-template-columns:1fr!important;gap:10px!important}.mbeco-chess-board .mbeco-tile:nth-child(2n+1){background:#eaf0f5}.mbeco-chess-pieces{width:100%;padding:0;flex-direction:row;justify-content:space-evenly;font-size:27px;gap:8px}.mbeco-chess-left{order:-1}.mbeco-chess-right{order:2}}

/* v2.4: quiet 3D chess compositions, decorative only; native course cards remain readable */
.mbeco-chess-layout{grid-template-columns:105px minmax(0,1fr) 105px;gap:4px;overflow:visible;align-items:stretch}
.mbeco-chess-art{pointer-events:none;user-select:none;align-self:stretch;min-height:360px;background-repeat:no-repeat;background-size:contain;background-position:center center;opacity:.92;filter:saturate(.83)}
.mbeco-chess-art-left{background-image:url(assets/chess-3d-left.svg);transform:translateX(4px)}
.mbeco-chess-art-right{background-image:url(assets/chess-3d-right.svg);transform:translateX(-4px)}
.mbeco-chess-board .mbeco-tile:nth-child(2n+1){background:#f1f6f8}
.mbeco-chess-board .mbeco-tile:nth-child(2n){background:#fff}
@media(max-width:850px){.mbeco-chess-layout{grid-template-columns:58px minmax(0,1fr) 58px;gap:2px}.mbeco-chess-art{min-height:330px;opacity:.65}}
@media(max-width:570px){.mbeco-chess-layout{display:block;position:relative}.mbeco-chess-board{position:relative;z-index:1}.mbeco-chess-art{position:absolute;width:45px;height:160px;min-height:0;opacity:.2;background-position:center top;z-index:0}.mbeco-chess-art-left{left:-19px;top:-35px}.mbeco-chess-art-right{right:-19px;bottom:-30px;top:auto}.mbeco-chess-board .mbeco-tile{background:#fff!important}}

/* v2.5: photographic chess accents; preserve full-width, readable native course cards */
.mbeco-chess-layout{
  display:grid;grid-template-columns:minmax(75px,125px) minmax(0,1fr) minmax(75px,125px);
  gap:12px;align-items:center;width:100%;max-width:1250px;margin:30px auto 36px;
}
.mbeco-chess-board{width:100%;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px!important}
.mbeco-chess-board .mbeco-tile{min-width:0}
.mbeco-chess-art{
  align-self:center;min-height:0;height:370px;width:100%;
  background-size:contain;background-position:center center;background-repeat:no-repeat;
  transform:none;opacity:.94;filter:none;
}
.mbeco-chess-art-left{background-image:url(assets/chess-photo-left.png);transform:none}
.mbeco-chess-art-right{background-image:url(assets/chess-photo-right.png);transform:none}
@media(max-width:1050px){
  .mbeco-chess-layout{grid-template-columns:65px minmax(0,1fr) 65px;gap:8px}
  .mbeco-chess-art{height:300px;min-height:0;opacity:.8}
}
@media(max-width:750px){
  .mbeco-chess-layout{display:block;position:relative;margin:22px auto 30px}
  .mbeco-chess-board{grid-template-columns:1fr!important;position:relative;z-index:1}
  .mbeco-chess-art{display:none}
  .mbeco-chess-board .mbeco-tile:nth-child(2n+1){background:#f1f6f8!important}
  .mbeco-chess-board .mbeco-tile:nth-child(2n){background:#fff!important}
}

/* v2.6: chess artwork sits ABOVE the complete, full-width course board */
.mbeco-chess-layout{
 display:grid!important;grid-template-columns:1fr 1fr!important;
 grid-template-areas:"left right" "board board"!important;
 align-items:end!important;column-gap:20px!important;row-gap:16px!important;
 max-width:1180px!important;width:100%!important;margin:26px auto 34px!important;
 overflow:visible!important;
}
.mbeco-chess-art{
 display:block!important;position:static!important;min-height:0!important;
 height:145px!important;width:100%!important;
 background-size:auto 100%!important;opacity:.9!important;
 filter:none!important;transform:none!important;
}
.mbeco-chess-art-left{grid-area:left!important;background-position:left bottom!important}
.mbeco-chess-art-right{grid-area:right!important;background-position:right bottom!important}
.mbeco-chess-board{
 grid-area:board!important;display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:16px!important;width:100%!important;min-width:0!important;
 position:relative!important;z-index:1!important;
}
.mbeco-chess-board .mbeco-tile{min-width:0!important;box-sizing:border-box!important}
@media(max-width:750px){
 .mbeco-chess-layout{column-gap:8px!important;row-gap:12px!important;margin:20px auto 28px!important}
 .mbeco-chess-art{height:100px!important;opacity:.8!important}
 .mbeco-chess-board{grid-template-columns:1fr!important;gap:12px!important}
}
@media(max-width:420px){.mbeco-chess-art{height:78px!important}}

/* v2.7: ONE unified chess header, not floating chess images beside the cards. */
.mbeco-chess-layout{
 display:flex!important;flex-direction:column!important;
 width:100%!important;max-width:1180px!important;
 margin:26px auto 34px!important;gap:14px!important;
}
.mbeco-chess-header{
 width:100%;height:172px;box-sizing:border-box;
 display:grid;grid-template-columns:1fr minmax(180px,2fr) 1fr;
 align-items:center;overflow:hidden;position:relative;
 border:1px solid #e2e8ed;border-radius:14px;
 background:linear-gradient(110deg,#f0f5f8 0%,#fff 48%,#fff6ec 100%);
}
.mbeco-chess-header .mbeco-chess-art{
 display:block!important;position:static!important;
 width:100%!important;height:165px!important;min-height:0!important;
 background-repeat:no-repeat!important;background-size:auto 150px!important;
 opacity:.95!important;filter:none!important;transform:none!important;
}
.mbeco-chess-header .mbeco-chess-art-left{background-position:18% bottom!important}
.mbeco-chess-header .mbeco-chess-art-right{background-position:82% bottom!important}
.mbeco-chess-header-label{
 font-size:clamp(12px,1.35vw,18px);font-weight:800;letter-spacing:.16em;
 color:#19344c;text-align:center;line-height:1.5;padding:0 8px;
}
.mbeco-chess-board{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:16px!important;width:100%!important;min-width:0!important;
 margin:0!important;
}
.mbeco-chess-board .mbeco-tile{min-width:0!important}
@media(max-width:750px){
 .mbeco-chess-header{height:115px;grid-template-columns:1fr 1.4fr 1fr}
 .mbeco-chess-header .mbeco-chess-art{display:block!important;height:110px!important;background-size:auto 102px!important;opacity:.85!important}
 .mbeco-chess-header-label{font-size:11px;letter-spacing:.08em}
 .mbeco-chess-board{grid-template-columns:1fr!important;gap:12px!important}
}
@media(max-width:380px){
 .mbeco-chess-header{height:94px}
 .mbeco-chess-header .mbeco-chess-art{height:90px!important;background-size:auto 85px!important}
 .mbeco-chess-header-label{font-size:10px}
}

/* v2.8: override legacy named grid areas that hid artwork and shifted the label */
.mbeco-chess-header{display:grid!important;grid-template-areas:none!important;grid-template-columns:minmax(0,1fr) minmax(180px,2fr) minmax(0,1fr)!important;align-items:center!important}
.mbeco-chess-header > .mbeco-chess-art-left{grid-area:auto!important;grid-column:1!important;grid-row:1!important;background-image:url(assets/chess-photo-left.png)!important;background-position:center bottom!important}
.mbeco-chess-header > .mbeco-chess-header-label{grid-area:auto!important;grid-column:2!important;grid-row:1!important;justify-self:center!important;align-self:center!important;text-align:center!important}
.mbeco-chess-header > .mbeco-chess-art-right{grid-area:auto!important;grid-column:3!important;grid-row:1!important;background-image:url(assets/chess-photo-right.png)!important;background-position:center bottom!important}
@media(max-width:750px){.mbeco-chess-header{grid-template-columns:minmax(0,1fr) minmax(120px,1.5fr) minmax(0,1fr)!important}}

/* v2.9: chess images have soft alpha edges; no hard rectangular boundaries. */
.mbeco-chess-header .mbeco-chess-art{background-color:transparent!important}


/* MBECO v3.1 – compact two-column course board on mobile.
   Overrides older mobile one-column declarations above. */
@media (min-width: 421px) and (max-width: 750px) {
  .mbeco-chess-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}
@media (max-width: 420px) {
  .mbeco-chess-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}
@media (max-width: 750px) {
  .mbeco-chess-layout { margin: 18px auto 26px !important; gap: 12px !important; }
  .mbeco-chess-board { width: 100% !important; }
  .mbeco-chess-board .mbeco-tile {
    min-width: 0 !important;
    padding: 13px 11px !important;
    overflow-wrap: anywhere;
    hyphens: auto;
    font-size: 13px !important;
    line-height: 1.42 !important;
  }
  .mbeco-chess-board .mbeco-tile h3,
  .mbeco-chess-board .mbeco-tile h4 {
    font-size: 14px !important;
    line-height: 1.28 !important;
    margin-top: 0 !important;
  }
  .mbeco-chess-board .mbeco-tile p { font-size: 12px !important; line-height: 1.48 !important; }
  .mbeco-chess-board .mbeco-tile:nth-child(odd) { background: #f1f6f8 !important; }
  .mbeco-chess-board .mbeco-tile:nth-child(even) { background: #fff !important; }
  .mbeco-chess-header { height: 105px !important; }
  .mbeco-chess-header .mbeco-chess-art {
    height: 100px !important;
    background-size: auto 95px !important;
  }
}


/* v3.2: consistent section widths and non-cropped illustrations. */
.mbeco-section .mbeco-shell { width:100%; max-width:1180px; margin-left:auto; margin-right:auto; }
.mbeco-impact .mbeco-intro,
.mbeco-section[id^="training"] .mbeco-intro { max-width:none; }
.mbeco-impact .mbeco-editorial-image,
.mbeco-section[id^="training"] .mbeco-editorial-image {
  width:100%; max-width:none; margin-left:0; margin-right:0;
}
.mbeco-impact .mbeco-editorial-image img,
.mbeco-section[id^="training"] .mbeco-editorial-image img {
  width:100%; height:auto; aspect-ratio:auto; object-fit:contain;
}
.mbeco-impact .mbeco-value-grid,
.mbeco-section[id^="training"] .mbeco-chess-layout { width:100%; max-width:none; }
@media (max-width:750px) {
  /* True checkerboard parity in a two-column grid, including the last row. */
  .mbeco-section .mbeco-chess-board { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; grid-auto-flow:row!important; gap:9px!important; }
  .mbeco-section .mbeco-chess-board > .mbeco-tile { min-width:0!important; width:auto!important; margin:0!important; grid-column:auto!important; grid-row:auto!important; overflow-wrap:break-word; }
  .mbeco-section .mbeco-chess-board > .mbeco-tile:nth-child(4n+1),
  .mbeco-section .mbeco-chess-board > .mbeco-tile:nth-child(4n+4) { background:#f1f6f8!important; }
  .mbeco-section .mbeco-chess-board > .mbeco-tile:nth-child(4n+2),
  .mbeco-section .mbeco-chess-board > .mbeco-tile:nth-child(4n+3) { background:#fff!important; }
  .mbeco-editorial-image { overflow:visible; }
  .mbeco-editorial-image img { width:100%!important; height:auto!important; max-height:none!important; aspect-ratio:auto!important; object-fit:contain!important; }
}


/* v3.3: consistent visual width across impact and training in EN/SV/FI.
   Override both theme and WordPress block defaults for figure sizing. */
.mbeco-section.mbeco-impact > .mbeco-shell,
.mbeco-section[id^="training"] > .mbeco-shell { width:100%; max-width:1180px; margin-inline:auto; }
.mbeco-section.mbeco-impact .mbeco-editorial-image,
.mbeco-section[id^="training"] .mbeco-editorial-image {
  display:block!important; box-sizing:border-box!important;
  width:100%!important; max-width:100%!important;
  margin:28px 0 8px!important; padding:0!important;
  overflow:hidden;
}
.mbeco-section.mbeco-impact .mbeco-editorial-image img,
.mbeco-section[id^="training"] .mbeco-editorial-image img {
  display:block!important; width:100%!important; max-width:100%!important;
  height:auto!important; aspect-ratio:3/1!important; object-fit:contain!important;
}
.mbeco-section.mbeco-impact .mbeco-intro,
.mbeco-section[id^="training"] .mbeco-intro,
.mbeco-section.mbeco-impact h2,
.mbeco-section[id^="training"] h2 { width:100%; max-width:100%!important; }
.mbeco-section.mbeco-impact .mbeco-value-grid,
.mbeco-section[id^="training"] .mbeco-chess-layout { width:100%!important; max-width:100%!important; }
/* Different portrait in the trainer biography; keep original in the hero. */
.mbeco-about-photo { background-image:url(assets/magnus-about.jpg)!important; background-position:center 28%; }
@media(max-width:750px){
 .mbeco-section.mbeco-impact .mbeco-editorial-image,
 .mbeco-section[id^="training"] .mbeco-editorial-image { margin:22px 0 8px!important; }
 .mbeco-section.mbeco-impact .mbeco-editorial-image img,
 .mbeco-section[id^="training"] .mbeco-editorial-image img { aspect-ratio:auto!important; height:auto!important; object-fit:contain!important; }
}



/* MBECO v3.5: three full-height vertical brand stripes.
   Colors sampled from the embedded MBECO logo, no diagonal backgrounds. */
:root {
  --mbeco-rail-orange: #FC9313;
  --mbeco-rail-turquoise: #019AAD;
}
body {
  background-image: none !important;
}
.mbeco-hero,
.mbeco-section,
.mbeco-section.alt,
.mbeco-impact {
  background-image: none !important;
}
.mbeco-hero { background-color: #f3fafb; }
.mbeco-section.alt, .mbeco-impact { background-color: #f3fafb; }
body::before {
  content: "";
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 25px;
  height: 100vh;
  pointer-events: none;
  background: linear-gradient(to right,
    var(--mbeco-rail-orange) 0 9px,
    transparent 9px 14px,
    var(--mbeco-rail-turquoise) 14px 17px,
    transparent 17px 22px,
    var(--mbeco-rail-orange) 22px 25px);
}
@media (max-width: 750px) {
  body::before {
    width: 15px;
    background: linear-gradient(to right,
      var(--mbeco-rail-orange) 0 5px,
      transparent 5px 8px,
      var(--mbeco-rail-turquoise) 8px 10px,
      transparent 10px 13px,
      var(--mbeco-rail-orange) 13px 15px);
  }
}

/* MBECO v3.6: move decorative stripes into left whitespace and double widths on desktop. */
@media (min-width: 1001px) {
  body::before {
    left: clamp(135px, 18vw, 235px) !important;
    width: 50px !important;
    z-index: 20 !important;
    background: linear-gradient(to right,
      var(--mbeco-rail-orange) 0 18px,
      transparent 18px 28px,
      var(--mbeco-rail-turquoise) 28px 34px,
      transparent 34px 44px,
      var(--mbeco-rail-orange) 44px 50px) !important;
  }
}
/* Smaller screens have less empty margin; keep stripes safely outside text. */
@media (min-width: 751px) and (max-width: 1000px) {
  body::before { left: 18px !important; z-index: 20 !important; }
}
@media (max-width: 750px) {
  body::before { left: 8px !important; z-index: 20 !important; }
}

/* v3.7: section-aware three-strand DNA motif replaces the old fixed rails. */
body::before { content:none !important; display:none !important; }
.mbeco-dna-rail { position:absolute; top:0; left:0; width:115px; overflow:visible; pointer-events:none; z-index:15; }
@media (max-width:750px) { .mbeco-dna-rail { width:37px; opacity:.55; } }

/* v3.8: mobile safety — keep the decorative rail entirely out of content.
   Tablets retain a narrow clipped accent; phones hide it for legibility. */
@media (min-width: 481px) and (max-width: 750px) {
  .mbeco-dna-rail {
    position: absolute !important;
    left: 0 !important;
    width: 18px !important;
    max-width: 18px !important;
    overflow: hidden !important;
    opacity: .5 !important;
    z-index: 1 !important;
  }
}
@media (max-width: 480px) {
  .mbeco-dna-rail { display: none !important; }
}

/* MBECO v3.9: show the three DNA strands on portrait phones without overlaying content.
   The 26px SVG gutter is separate from the content's >=34px left inset. */
@media (max-width: 750px) {
  .mbeco-dna-rail {
    display:block !important; position:absolute !important; left:0 !important;
    width:26px !important; max-width:26px !important; overflow:hidden !important;
    opacity:.88 !important; z-index:3 !important; pointer-events:none !important;
  }
  .mbeco-shell { padding-left:36px !important; }
  .mbeco-header-inner { padding-left:36px !important; }
  .mbeco-footer-inner { padding-left:36px !important; }
}
@media (max-width: 380px) {
  .mbeco-dna-rail { width:22px !important; max-width:22px !important; }
  .mbeco-shell, .mbeco-header-inner, .mbeco-footer-inner { padding-left:31px !important; }
}

/* MBECO v4.0 — responsive DNA gutter. On ordinary laptops, never position
   the decorative SVG inside the centered content column. Reserve a narrow
   left-edge gutter, including for all three languages and viewport zoom. */
@media (min-width:751px) and (max-width:1250px) {
  .mbeco-dna-rail {
    left:0 !important;
    width:30px !important;
    max-width:30px !important;
    overflow:hidden !important;
    opacity:.88 !important;
    pointer-events:none !important;
  }
  .mbeco-hero .mbeco-shell,
  .mbeco-section .mbeco-shell,
  .mbeco-header-inner,
  .mbeco-footer-inner {
    padding-left:max(50px, env(safe-area-inset-left)) !important;
  }
}
/* The existing phone gutter remains visible in portrait orientation. */

/* v4.1: multilingual legal footer and logo */
.mbeco-footer-brand{display:flex;align-items:center;gap:20px;min-width:0}
.mbeco-footer-logo{display:block;width:148px;max-width:35vw;height:auto;object-fit:contain;background:#fff;border-radius:8px;padding:8px}
.mbeco-footer-company strong{font-size:1.1rem}
.mbeco-footer-company p{margin:7px 0 0}
@media(max-width:600px){.mbeco-footer-brand{align-items:flex-start;gap:12px;flex-wrap:wrap}.mbeco-footer-logo{width:122px}.mbeco-footer-inner{gap:18px}}

/* v4.3: Finnish chess tile on narrow mobile screens. Keep the full heading,
   provide a natural compound-word break and avoid orphaned final letters. */
@media (max-width: 750px) {
  .mbeco-chess-board .mbeco-tile h3.mbeco-fi-styles-title {
    font-size: 12px !important;
    line-height: 1.28 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: manual !important;
  }
}

/* v4.4: Prevent an orphaned ending in the Finnish practice chess tile on phones. */
@media (max-width: 750px) {
  .mbeco-chess-board .mbeco-tile h3.mbeco-fi-practice-title {
    font-size: 11px !important;
    line-height: 1.25 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: manual !important;
  }
}

/* v4.5: Finnish mobile chess cards: natural compound breaks and balanced type. */
@media (max-width: 750px) {
  .mbeco-chess-board .mbeco-tile p.mbeco-fi-styles-description {
    font-size: 11.5px !important;
    line-height: 1.43 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: manual !important;
  }
  .mbeco-chess-board .mbeco-tile h3.mbeco-fi-practice-title {
    font-size: 12px !important;
    line-height: 1.28 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: manual !important;
    letter-spacing: -0.15px;
  }
}

/* v4.6: unobtrusive, accessible expandable privacy notice in footer */
.mbeco-privacy-footer{margin-top:20px;padding-top:12px;border-top:1px solid rgba(255,255,255,.18)}
.mbeco-privacy-details{font-size:12px;line-height:1.55;max-width:920px}
.mbeco-privacy-details summary{cursor:pointer;display:inline-block;text-decoration:underline;text-underline-offset:3px;color:#bcebf3;list-style:none}
.mbeco-privacy-details summary::-webkit-details-marker{display:none}
.mbeco-privacy-details summary:focus-visible{outline:2px solid #fff;outline-offset:4px}
.mbeco-privacy-content{padding:14px 0 2px;color:#e4f2f5;max-width:780px}
.mbeco-privacy-content h2{font-size:17px;margin:0 0 10px;color:white}
.mbeco-privacy-content p{margin:0 0 11px}

/* v4.8: full-size readable privacy notice while keeping footer link discreet */
.mbeco-footer .mbeco-privacy-details[open]{max-width:100%;}
.mbeco-footer .mbeco-privacy-content{font-size:18px !important;line-height:1.75 !important;max-width:900px;}
.mbeco-footer .mbeco-privacy-content p{font-size:inherit !important;line-height:inherit !important;margin:0 0 1em;}
.mbeco-footer .mbeco-privacy-content h2{font-size:clamp(25px,3vw,32px) !important;line-height:1.25;margin:8px 0 18px;}
.mbeco-footer .mbeco-privacy-details summary{font-size:12px;}
@media(max-width:570px){.mbeco-footer .mbeco-privacy-content{font-size:17px !important;}}

/* v5.0: closed disclosure must occupy no space beyond its summary. */
.mbeco-footer .mbeco-privacy-details:not([open]) > .mbeco-privacy-content { display:none !important; }
.mbeco-footer .mbeco-privacy-details:not([open]) { height:auto !important; min-height:0 !important; }

/* v5.2: accessible language selector with flags */
.mbeco-lang button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;gap:4px;min-height:35px;font-size:12px;line-height:1.2}

/* v5.3: flags at twice the previous 12px size, labels unchanged */
.mbeco-lang .mbeco-lang-flag{font-size:24px;line-height:1;display:inline-block;vertical-align:middle}

/* v5.4: real SVG flag images, consistently visible at 30x20px */
.mbeco-lang .mbeco-lang-flag{display:block;width:30px;height:20px;min-width:30px;object-fit:cover;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.mbeco-lang button{gap:7px;padding:7px 9px;min-height:38px}
