/* ESG-REDESIGN-1 (20.10.2026): free-course pages look and behave like the free landings of the course sites.
   Scope: only pages with <body> ... .ffx (free-* and fi/ilmainen-*). Loaded after /assets/esg.css and the page's own <style>. */
:root,.ffx{--x-navy:#112d40;--x-navy2:#0c2231;--x-line:rgba(255,255,255,.16);--x-orange:#f97316;--x-orange2:#ea580c;--x-green:#1f7a4d;--x-ink:#0f1a2a;--x-mut:#5b6b78;--x-paper:#fff;--x-cream:#fbf7f2}
.ffx *{box-sizing:border-box}

/* ---------- hero: copy + course card ---------- */
.ffx-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:34px;align-items:center;padding:18px 0 10px}
.ffx-hero .ff-hero{padding:0}
.ffx-hero h1{margin-top:6px}
.ffx-cta{display:flex;flex-wrap:wrap;gap:12px 14px;margin:20px 0 6px;align-items:center}
.ffx-btn{display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:14px 24px;border-radius:12px;background:var(--x-orange);color:#fff!important;font-weight:800;font-size:17px;text-decoration:none;box-shadow:0 8px 22px rgba(249,115,22,.28);transition:transform .15s,background .15s}
.ffx-btn:hover{background:var(--x-orange2);transform:translateY(-1px)}
.ffx-btn:active{transform:scale(.98)}
.ffx-link{display:inline-flex;align-items:center;min-height:52px;padding:0 6px;color:var(--ffnavy,#16305a)!important;font-weight:700;text-decoration:underline;text-underline-offset:4px;font-size:16px}
.ffx-card{position:relative;border-radius:20px;overflow:hidden;background:var(--x-navy);color:#fff;box-shadow:0 18px 44px rgba(17,45,64,.22)}
.ffx-card-img{position:relative;aspect-ratio:16/10;background:linear-gradient(135deg,#16405b,#0c2231)}
.ffx-card-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ffx-card-img::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,rgba(12,34,49,.78),rgba(12,34,49,0) 55%)}
.ffx-badge{position:absolute;z-index:2;left:14px;bottom:12px;right:14px;font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#fff;text-shadow:0 1px 8px rgba(0,0,0,.45)}
.ffx-facts{list-style:none;margin:0;padding:14px 18px 16px;display:grid;gap:9px}
.ffx-facts li{display:flex;gap:11px;align-items:flex-start;font-size:14.5px;line-height:1.4;color:#e8f0f5}
.ffx-facts svg{flex:none;width:19px;height:19px;margin-top:1px;stroke:var(--x-orange);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ffx-facts b{color:#fff}

/* the old 3-step strip stays (it carries the certificate link) but gets a lighter look */
.ffx .ff-steps{margin:16px 0 0;background:#fff;border-radius:14px}

/* ---------- learn panel ---------- */
.ffx-learn{margin:26px 0 8px;padding:34px 30px 30px;border-radius:24px;background:radial-gradient(1200px 500px at 85% -10%,#1a4560 0,transparent 60%),var(--x-navy);color:#fff;scroll-margin-top:84px}
.ffx-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:28px;align-items:end;margin-bottom:22px}
.ffx-eyebrow{margin:0 0 8px;font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#b9cbd6}
.ffx-learn h2{margin:0;color:#fff;font-size:clamp(28px,3.6vw,40px);line-height:1.1;letter-spacing:-.02em}
.ffx-sub{margin:12px 0 0;color:#d6e3ea;font-size:16px;line-height:1.55;max-width:34em}
.ffx-lab{display:block;margin:0 0 9px;font-size:13px;font-weight:800;color:#fff}
.ffx-flags{display:flex;flex-wrap:wrap;gap:7px}
.ffx-flag{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:5px 12px 5px 9px;border:2px solid transparent;border-radius:999px;background:#fff;color:var(--x-ink);font:800 12.5px/1 inherit;font-family:inherit;letter-spacing:.03em;cursor:pointer;transition:transform .12s,box-shadow .12s}
.ffx-flag span:first-child{font-size:17px;line-height:1;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.ffx-flag:hover{transform:translateY(-1px);box-shadow:0 4px 14px rgba(0,0,0,.25)}
.ffx-flag[aria-pressed=true]{border-color:var(--x-orange);background:#fff3e8;color:#9a3d06}
.ffx-flag:focus-visible,.ffx-tile:focus-visible,.ffx-xbtn:focus-visible,.ffx-btn:focus-visible{outline:3px solid #ffd2b0;outline-offset:2px}
.ffx-lang select{display:block;width:100%;margin-top:10px;min-height:46px;border:1px solid #a9bac4;border-radius:10px;background:#fff;color:var(--x-ink);padding:9px 12px;font:600 16px/1.2 inherit;font-family:inherit;background-image:none;max-width:none}
.ffx-lang label.ff-lang{display:block}

/* module tiles */
.ffx-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:10px;margin:0 0 16px}
.ffx-tile{position:relative;display:flex;flex-direction:column;justify-content:center;gap:5px;min-height:84px;padding:13px 14px;border-radius:12px;border:1px solid transparent;background:rgba(255,255,255,.07);color:#fff!important;text-decoration:none;text-align:left;cursor:pointer;transition:transform .12s,background .15s}
.ffx-tile .l{font-size:11.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:#cfe0ea}
.ffx-tile .t{font-size:14.5px;font-weight:700;line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.ffx-tile .g{position:absolute;right:11px;top:10px;font-size:10px;font-weight:800;letter-spacing:.06em;color:#9fe0bd}
.ffx-tile:hover{background:rgba(255,255,255,.13);transform:translateY(-1px)}
.ffx-tile.is-current{background:var(--x-orange);border-color:var(--x-orange);box-shadow:0 8px 22px rgba(249,115,22,.32)}
.ffx-tile.is-current .l,.ffx-tile.is-current .g{color:#fff}
.ffx-tile.is-done{background:rgba(31,122,77,.28);border-color:rgba(159,224,189,.35)}
.ffx-tile.is-done .l::after{content:" \2713";color:#9fe0bd}
.ffx-tile.is-locked{background:rgba(255,255,255,.05);color:#8fa6b4!important;cursor:not-allowed}
.ffx-tile.is-locked:hover{transform:none;background:rgba(255,255,255,.05)}
.ffx-tile.is-locked .l,.ffx-tile.is-locked .g{color:#7d95a4}
.ffx-tile--test{background:rgba(255,245,235,.12);border-color:rgba(249,115,22,.4)}
.ffx-tile--cert{background:rgba(255,255,255,.04);border:1px dashed rgba(255,255,255,.28)}
.ffx-tile--cert .g{color:#ffd2b0}
.ffx-tile--cert em{font-style:normal;margin-left:6px;color:#ffd2b0;font-weight:800}

/* player shell */
.ffx-shell{position:relative;border:1px solid rgba(255,255,255,.28);border-radius:16px;overflow:hidden;background:var(--x-navy);color:#fff}
.ffx-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 14px 10px 18px;min-height:58px;border-bottom:1px solid var(--x-line);background:var(--x-navy)}
.ffx-bar>span{min-width:0;font-size:14.5px;font-weight:700;line-height:1.4}
.ffx-xbtn{flex:none;min-height:40px;padding:8px 14px;border:0;border-radius:9px;background:var(--x-orange);color:#fff;font:800 13px/1.2 inherit;font-family:inherit;cursor:pointer;white-space:nowrap}
.ffx-xbtn:hover{background:var(--x-orange2)}
.ffx-pb{padding:9px 18px 8px;border-bottom:1px solid var(--x-line);background:var(--x-navy2);font:700 12px/1.2 inherit;font-family:inherit;color:#e6edf1}
.ffx-pb-row{display:flex;justify-content:space-between;gap:12px;margin-bottom:6px}
.ffx-pb-t{position:relative;height:8px;border-radius:8px;background:rgba(255,255,255,.16);overflow:hidden}
.ffx-pb-f{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:8px;background:var(--x-orange);transition:width .9s linear}
.ffx-stage{position:relative;background:#fff}
.ffx-stage iframe{display:block;width:100%;height:min(80vh,720px);min-height:480px;border:0;background:#fff}
.ffx-veil{position:absolute;inset:0;z-index:5;border:0;padding:0;background:transparent;cursor:pointer}
.ffx-bottom{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 18px;border-top:1px solid var(--x-line);background:var(--x-navy);font-size:13px}
.ffx-bottom a{color:#fff;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.ffx-shell.is-expanded{position:fixed;inset:10px;z-index:1000;display:flex;flex-direction:column;border-radius:14px;box-shadow:0 0 0 100vmax rgba(5,15,22,.78)}
.ffx-shell.is-expanded .ffx-stage{flex:1;min-height:0}
.ffx-shell.is-expanded .ffx-stage iframe{height:100%;max-height:none}
html.ffx-lock,html.ffx-lock body{overflow:hidden}
.ffx-copy{margin:10px 2px 0!important;font-size:12.5px;color:var(--x-mut)}
.ffx-learn+.ffx-copy,.ffx-copy{margin-top:12px}

/* certificate block: same content, landing-like card */
.ffx .ff-cert{border:1px solid #f0d9c4;background:var(--x-cream);box-shadow:0 10px 30px rgba(17,45,64,.06)}
.ffx .ff-cert h2{color:var(--ffnavy)}
.ffx .ff-cert .ff-btn{background:var(--x-orange);box-shadow:0 8px 22px rgba(249,115,22,.25)}
.ffx .ff-cert .ff-btn:hover{background:var(--x-orange2)}
.ffx .ff-steps .ff-btn{background:var(--ffnavy)}
.ffx .ff-price{color:var(--ffnavy)}

/* single-language courses (UK manual handling): no language block */
.ffx-onelang .ffx-lang{display:none}.ffx-onelang .ffx-head{grid-template-columns:1fr}
/* certificate step opened by the lead script: same look as the rest */
.ffx .ffc,.ffc{background:var(--x-navy)!important;border-radius:18px!important}
.ffc button{background:var(--x-orange)!important;color:#fff!important;box-shadow:0 8px 22px rgba(249,115,22,.25)}
.ffc button:hover{background:var(--x-orange2)!important}
.ffc b{word-break:normal!important;overflow-wrap:anywhere}
.ffc input:focus{border-color:var(--x-orange)!important}

/* lead modal (email before the first module) */
.ffx-ov{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(8,22,32,.72);backdrop-filter:blur(3px)}
.ffx-ov[hidden]{display:none}
.ffx-md{position:relative;width:100%;max-width:460px;max-height:calc(100dvh - 32px);overflow:auto;padding:26px 24px 22px;border-radius:18px;background:#fff;color:var(--x-ink);box-shadow:0 24px 70px rgba(0,0,0,.45)}
.ffx-md h2{margin:0 0 8px;font-size:23px;line-height:1.2;color:var(--ffnavy,#16305a)}
.ffx-md p{margin:0 0 14px;color:#34465a;font-size:15px;line-height:1.5}
.ffx-md input[type=email]{width:100%;font:inherit;font-size:17px;padding:13px 14px;border-radius:10px;border:2px solid #b8c7d3;background:#fff;color:var(--x-ink)}
.ffx-md input[type=email]:focus{outline:none;border-color:var(--x-orange)}
.ffx-md label.ck{display:flex;gap:9px;align-items:flex-start;margin:12px 0 0;font-size:14px;line-height:1.4;color:#34465a;cursor:pointer}
.ffx-md label.ck input{margin-top:2px;width:17px;height:17px;flex:none}
.ffx-md .er{min-height:1.2em;margin:8px 0 2px;color:#b42318;font-size:14px}
.ffx-md button[type=submit]{width:100%;min-height:50px;border:0;border-radius:12px;background:var(--x-orange);color:#fff;font:800 17px/1 inherit;font-family:inherit;cursor:pointer;box-shadow:0 8px 22px rgba(249,115,22,.28)}
.ffx-md button[type=submit]:hover{background:var(--x-orange2)}
.ffx-md small{display:block;margin-top:12px;color:#5b6b78;font-size:12.5px;line-height:1.4}
.ffx-md small a{color:#34465a}
.ffx-md .x{position:absolute;right:10px;top:8px;width:38px;height:38px;border:0;border-radius:50%;background:transparent;color:#5b6b78;font-size:24px;line-height:1;cursor:pointer}
.ffx-md .x:hover{background:#eef2f5}

@media(max-width:980px){
 .ffx-hero{grid-template-columns:1fr;gap:20px}
 .ffx-head{grid-template-columns:1fr;gap:18px}
 }

@media(max-width:620px){
 .ffx-learn{margin:20px -6px 6px;padding:24px 14px 18px;border-radius:18px}
 .ffx-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .ffx-tile{min-height:78px;padding:11px 11px}
 .ffx-tile .t{font-size:13.5px}
 .ffx-flags{gap:6px}
 .ffx-flag{min-height:33px;padding:3px 9px 3px 6px;gap:4px;font-size:11.5px}
 .ffx-flag span:first-child{font-size:15px}
 .ffx-bar{padding:9px 10px 9px 12px}
 .ffx-bar>span{font-size:13px}
 .ffx-stage iframe{height:min(calc(100svh - 150px),700px);min-height:520px}
 .ffx-pb,.ffx-bottom{padding-left:12px;padding-right:12px}
 .ffx-btn{width:100%;justify-content:center}
 .ffx-shell.is-expanded{inset:0;border-radius:0}
 .ffx-md{padding:24px 18px 18px}
}
@media(prefers-reduced-motion:reduce){.ffx-pb-f,.ffx-tile,.ffx-flag,.ffx-btn{transition:none}}
