/* The MAGNOTHERM case study's own pieces, used by both options (magnotherm.js runs them).
   The page keeps the usual case study frame: the text stays on the left and the work runs
   down the right. What changes is the work: films, a live Diary, phones with carousels,
   a moving strip of posts and a scene changer for the renders, in place of flat pictures.
   Nothing moves for anyone whose system asks for less motion. */

@font-face{font-family:"Atkinson Hyperlegible Next";src:url(../fonts/AtkinsonHyperlegibleNext.woff2) format("woff2");
  font-weight:200 800;font-display:swap}

.mt{--e:cubic-bezier(.3,.7,.2,1)}
/* every block in the column: square, no picture styles from site.css on what's inside */
.mt-b{position:relative;overflow:hidden;background:var(--well)}
.stack .mt-b img{border-radius:0;outline:0;background:none}
.js .stack .mt-b img:not(.in){background:none;animation:none}
.b-in .bp .stack > .mt-b{opacity:0;translate:0 48px;transition:opacity 1s var(--ease),translate 1.2s var(--ease)}
.b-in .bp .stack > .mt-b.seen{opacity:1;translate:0 0}

/* small labels on top of a block */
.mt-cap{position:absolute;left:16px;bottom:14px;z-index:2;font-size:12px;line-height:1;letter-spacing:.02em;
  text-transform:uppercase;color:rgba(255,255,255,.82);pointer-events:none;text-shadow:0 1px 8px rgba(0,0,0,.4)}

/* ---------- films ---------- */
.mt-film{aspect-ratio:16/9}
.mt-film video{display:block;width:100%;height:100%;object-fit:cover}

/* ---------- colours: eight columns, edge to edge, that grow up from the bottom ---------- */
.mt-colours{display:flex;aspect-ratio:16/8;background:#121212}
.mt-colours div{flex:1 1 0;display:flex;flex-direction:column;justify-content:flex-end;gap:4px;padding:16px 12px;min-width:0;
  font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;transform-origin:50% 100%;cursor:default;
  transition:flex-grow .7s var(--e)}
/* hover a colour and it widens; the others make room */
.mt-colours div:hover{flex-grow:2.6}
.mt-colours b{font-weight:400}
.mt-colours span{opacity:.7;font-variant-numeric:tabular-nums}
.mt-colours.wait div{transform:scaleY(0)}
.mt-colours.wait div *{opacity:0}
.mt-colours.go div{transform:none;transition:transform 1.1s var(--e) calc(var(--i) * 70ms),flex-grow .7s var(--e)}
.mt-colours.go div *{opacity:1;transition:opacity .5s ease calc(var(--i) * 70ms + .6s)}

/* two squares side by side: Magnus on the left, the icons on the right */
.mt-duo{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:none}
.mt-duo > div{position:relative;overflow:hidden;aspect-ratio:1/1}

/* Magnus, the mascot, standing: he sways a little, raises his eyebrows now and then, leans
   toward the pointer like a magnet (magnotherm.js sets --lean and --pull), and a click makes
   him hop. */
.mt-mascot{background:#fefaf2;color:#121212;cursor:pointer}
.mt-mascot .mt-cap{color:#121212;text-shadow:none}
.mt-mascot::before{content:"";position:absolute;left:50%;bottom:13%;width:46%;height:4%;translate:-50% 50%;border-radius:50%;
  background:rgba(18,18,18,.09);animation:mg-shadow 2.4s ease-in-out infinite alternate}
.mg{position:absolute;left:50%;bottom:13%;height:62%;aspect-ratio:845/698;translate:-50% 0;transform-origin:50% 100%;
  transform:translateX(var(--pull,0px)) rotate(var(--lean,0deg));transition:transform .7s var(--e)}
.mg svg{display:block;width:100%;height:100%;overflow:visible;transform-origin:50% 100%;animation:mg-idle 2.4s ease-in-out infinite alternate}
.mg-brows{animation:mg-brow 4.5s ease-in-out infinite}
.mt-mascot.hop .mg svg{animation:mg-hop .65s cubic-bezier(.3,.7,.2,1)}
.mt-mascot:not(.go)::before,.mt-mascot:not(.go) .mg svg,.mt-mascot:not(.go) .mg-brows{animation-play-state:paused}
@keyframes mg-idle{from{transform:rotate(-1.5deg)}to{transform:translateY(-2%) rotate(1.5deg)}}
@keyframes mg-shadow{from{scale:1}to{scale:.94}}
@keyframes mg-brow{0%,84%,100%{transform:none}88%,94%{transform:translateY(-16px)}}
@keyframes mg-hop{0%{transform:none}35%{transform:translateY(-16%) rotate(-6deg)}70%{transform:translateY(0) scaleY(.94)}100%{transform:none}}

/* the icons: they draw themselves in, one after another; hover one and it draws again */
.mt-icons{background:#1f381d;color:#c9f166;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;
  gap:clamp(10px,3vw,40px) clamp(14px,4vw,52px);padding:12%}
.mt-icons .mt-cap{color:#c9f166;text-shadow:none}
.mt-ic{width:24%;aspect-ratio:1/1;transition:scale .4s var(--e)}
.mt-ic:hover{scale:1.12}
.mt-ic svg{display:block;width:100%;height:100%;overflow:visible}
.mt-icons path{stroke-dasharray:1;stroke-dashoffset:0}
.mt-icons.wait path{stroke-dashoffset:1}
.mt-icons.go path{stroke-dashoffset:0;transition:stroke-dashoffset 1.6s var(--e) calc(var(--i) * .18s)}
.mt-ic.again path{stroke-dashoffset:1;transition:none}

/* ---------- Diary: a live screen in a browser window ---------- */
.mt-diary{background:#cfd2c8;padding:clamp(14px,3.2%,40px)}
.mt-dctl{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:clamp(10px,1.6%,18px);
  color:#121212;font-size:13px;line-height:1}
.mt-tabs,.mt-theme{display:flex;gap:2px;padding:3px;border-radius:99px;background:rgba(18,18,18,.08)}
.mt-tabs button,.mt-theme button{position:relative;overflow:hidden;border:0;border-radius:99px;padding:8px 13px;
  background:none;color:inherit;font:inherit;cursor:pointer;transition:background-color .3s ease,color .3s ease}
.mt-tabs button[aria-selected="true"],.mt-theme button[aria-pressed="true"]{background:#121212;color:#fefaf2}
/* the selected tab fills up while it waits for the next one */
.mt-tabs button i{position:absolute;left:0;bottom:0;height:2px;width:100%;background:#c9f166;transform:scaleX(0);transform-origin:left}
.mt-tabs.run button[aria-selected="true"] i{transform:scaleX(1);transition:transform var(--t,7s) linear}
.mt-dnote{margin-left:auto;margin-right:4px;opacity:.6}
.mt-dframe{border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 30px 60px -30px rgba(0,0,0,.45),0 0 0 1px rgba(0,0,0,.08)}
.mt-dbar{display:flex;align-items:center;gap:6px;height:clamp(18px,2.8vw,30px);padding:0 12px;background:#e9e9e6}
.mt-dbar i{width:8px;height:8px;border-radius:50%;background:#c6c6c2}
.mt-dview{position:relative;aspect-ratio:1440/900;overflow:hidden}

@media (max-width:640px){
  .mt-dctl{flex-wrap:wrap}
  .mt-dnote{display:none}
  .mt-tabs button,.mt-theme button{padding:7px 9px}
}

/* ---------- social: phones on the brand's green, then a moving strip of posts ---------- */
.mt-social{display:flex;justify-content:center;align-items:center;gap:clamp(16px,5%,64px);
  padding:clamp(28px,7%,88px) clamp(14px,4%,48px);background:#1f381d}
.mt-phone{flex:0 1 300px;min-width:0;border-radius:42px;padding:9px;background:#0b0b0b;
  box-shadow:0 40px 70px -30px rgba(0,0,0,.6),inset 0 0 0 1.5px #2a2a2a}
.mt-phone:nth-child(2){translate:0 8%}
.mt-screen{border-radius:34px;overflow:hidden;background:#fff;color:#121212;font:400 12px/1.35 Inter,"Helvetica Neue",Arial,sans-serif}
.mt-status{display:flex;justify-content:space-between;align-items:center;padding:12px 22px 6px;font-size:12px;font-weight:600}
.mt-status span:last-child{display:flex;gap:4px}
.mt-status span:last-child i{width:14px;height:8px;border-radius:2px;background:#121212}
.mt-status span:last-child i:first-child{width:10px;opacity:.6}
.mt-head{display:flex;align-items:center;gap:8px;padding:6px 12px 8px}
.mt-ava{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#1f381d;color:#c9f166}
.mt-ava svg{width:15px;height:15px}
.mt-head b{font-weight:600}
.mt-head em{margin-left:auto;font-style:normal;letter-spacing:1px;opacity:.6}
.mt-car{position:relative;overflow:hidden;aspect-ratio:3/4;touch-action:pan-y;cursor:grab;background:#ececec}
.mt-car:active{cursor:grabbing}
.mt-track{display:flex;height:100%;transition:transform .7s var(--e)}
.mt-track.drag{transition:none}
.mt-track img{display:block;flex:0 0 100%;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none}
.mt-count{position:absolute;top:10px;right:10px;padding:3px 8px;border-radius:99px;background:rgba(18,18,18,.6);color:#fff;font-size:11px}
.mt-acts{display:flex;align-items:center;gap:12px;margin-top:-6px;padding:0 12px 4px}
.mt-acts svg{width:20px;height:20px}
.mt-acts svg:last-child{margin-left:auto}
.mt-dots{display:flex;justify-content:center;gap:4px;padding:9px 0 0}
.mt-dots i{width:5px;height:5px;border-radius:50%;background:#c8c8c8;transition:background-color .3s ease,scale .3s ease}
.mt-dots i.on{background:#3a7bd5;scale:1.15}
.mt-text{padding:4px 12px 16px}
.mt-text b{font-weight:600;margin-right:4px}
.mt-text span{opacity:.55}

.mt-wall{padding:0;background:none}
.mt-run{display:flex;gap:10px;width:max-content}
.mt-run img{display:block;width:clamp(240px,27vw,390px);aspect-ratio:3/4;height:auto;object-fit:cover}
.mt-wall.go .mt-run{animation:mt-run 90s linear infinite}
.mt-wall:hover .mt-run{animation-play-state:paused}
@keyframes mt-run{to{transform:translateX(calc(-50% - 5px))}}

@media (max-width:560px){
  .mt-phone{flex-basis:78%;border-radius:34px;padding:7px}
  .mt-screen{border-radius:28px}
  .mt-phone:nth-child(2){display:none}
}

/* ---------- the website: three screens of the live site, floating ---------- */
.mt-site{aspect-ratio:16/10;background:#e4e2dd}
.mt-scr{position:absolute;margin:0;border-radius:8px;overflow:hidden;
  box-shadow:0 40px 70px -34px rgba(0,0,0,.5),0 0 0 1px rgba(0,0,0,.06);
  transform:translate3d(calc(var(--mx,0) * var(--d) * 1px),calc(var(--my,0) * var(--d) * 1px),0);
  transition:transform .9s var(--e),scale .5s var(--e)}
.mt-scr img{display:block;width:100%;height:auto}
.mt-scr > div{animation:mt-float var(--t) ease-in-out var(--o) infinite alternate}
.mt-scr:hover{scale:1.03;z-index:5}
.mt-scr.s1{left:5%;top:9%;width:54%;z-index:2;--d:-18;--t:5.2s;--o:-1s}
.mt-scr.s2{right:4%;top:5%;width:45%;z-index:1;--d:-9;--t:6.4s;--o:-3s}
.mt-scr.s3{left:31%;bottom:7%;width:53%;z-index:3;--d:-28;--t:5.8s;--o:-2s}
@keyframes mt-float{from{translate:0 -1.4%}to{translate:0 1.4%}}
.mt-site:not(.go) .mt-scr > div{animation-play-state:paused}

/* ---------- the pitch deck: one slide large, all of them small underneath ---------- */
.mt-deck{background:#d8d8d8;padding:clamp(14px,4%,52px) clamp(14px,4%,52px) clamp(12px,3%,36px)}
.mt-slides{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:6px;background:#121212;
  box-shadow:0 30px 60px -30px rgba(0,0,0,.55)}
.mt-slides img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;scale:1.02;
  transition:opacity .8s ease,scale 1.2s var(--e)}
.mt-slides img.on{opacity:1;scale:1}
.mt-thumbs{display:grid;grid-template-columns:repeat(9,1fr);gap:clamp(4px,.7vw,8px);margin-top:clamp(10px,1.6vw,18px)}
.mt-thumbs button{position:relative;padding:0;border:0;border-radius:3px;overflow:hidden;background:#121212;cursor:pointer;
  aspect-ratio:16/9;opacity:.55;transition:opacity .3s ease,translate .3s var(--e)}
.mt-thumbs button:hover{opacity:.85;translate:0 -2px}
.mt-thumbs button[aria-pressed="true"]{opacity:1;outline:2px solid #121212;outline-offset:2px}
.mt-thumbs img{display:block;width:100%;height:100%;object-fit:cover}
.mt-thumbs i{position:absolute;left:0;right:0;bottom:0;height:3px;background:#c9f166;transform:scaleX(0);transform-origin:left}
.mt-thumbs.run button[aria-pressed="true"] i{transform:scaleX(1);transition:transform var(--t,3.4s) linear}
.mt-cap.dark{color:#121212;text-shadow:none}

/* ---------- the brochure: a flipbook whose right page turns over the spine ---------- */
.mt-book{aspect-ratio:16/10;background:#dcd8cc;perspective:2200px}
.bk{position:absolute;left:50%;top:50%;height:80%;aspect-ratio:1190/842;translate:-50% -50%;
  transition:transform 1s var(--e),opacity .6s ease;transform-style:preserve-3d}
.bk.closed{transform:translateX(-25%)}
.bk.ended{transform:translateX(25%)}
.bk.fade{opacity:0}
.bk .pg,.bk .leaf{position:absolute;top:0;width:50%;height:100%}
.bk .pg.l{left:0}.bk .pg.r,.bk .leaf{left:50%}
.bk img{display:block;width:100%;height:100%;object-fit:cover}
.bk .pg img{box-shadow:0 22px 40px -22px rgba(0,0,0,.55)}
.bk .pg:empty,.bk .pg img[src=""]{display:none}
/* the fold: a little shade either side of the spine */
.bk .pg.l::after,.bk .pg.r::after,.bk .leaf .f::after,.bk .leaf .b::after{content:"";position:absolute;top:0;bottom:0;width:14%;pointer-events:none}
.bk .pg.l::after,.bk .leaf .b::after{right:0;background:linear-gradient(to left,rgba(0,0,0,.22),rgba(0,0,0,0))}
.bk .pg.r::after,.bk .leaf .f::after{left:0;background:linear-gradient(to right,rgba(0,0,0,.2),rgba(0,0,0,0))}
.bk .leaf{transform-origin:0 50%;transform-style:preserve-3d;visibility:hidden}
.bk .leaf.turn{visibility:visible;transform:rotateY(-180deg);transition:transform 1.25s cubic-bezier(.45,.05,.25,1)}
.bk .leaf.ready{visibility:visible}
.bk .leaf .f,.bk .leaf .b{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.bk .leaf .b{transform:rotateY(180deg)}

/* ---------- the lit table: a warm surface with window-blind shadows drifting over it, for
   the deck and the brochure (the light sits on top and darkens what is under it) ---------- */
.mt-lit{background:radial-gradient(120% 90% at 20% 10%,#ebe6db 0%,#d6d0c3 55%,#c7c0b1 100%)}
.mt-lit::after{content:"";position:absolute;inset:-20%;z-index:3;pointer-events:none;mix-blend-mode:multiply;
  background:repeating-linear-gradient(118deg,rgba(0,0,0,0) 0 7%,rgba(60,44,20,.24) 7% 11.5%,rgba(0,0,0,0) 11.5% 13%);
  filter:blur(14px);animation:mt-light 16s ease-in-out infinite alternate}
.mt-lit:not(.go)::after{animation-play-state:paused}
@keyframes mt-light{from{transform:translate3d(-3%,0,0) rotate(0deg)}to{transform:translate3d(3%,1%,0) rotate(.6deg)}}

/* the deck on a laptop */
.mt-laptop{aspect-ratio:16/10;perspective:1800px}
.lap{position:absolute;left:50%;top:48%;width:68%;translate:-50% -50%;transform:rotateX(5deg) rotateY(-9deg);transform-style:preserve-3d}
.lap-screen{padding:1.7% 1.7% 2.4%;border-radius:16px 16px 0 0;background:#0e0e0e;box-shadow:inset 0 0 0 1.5px #2b2b2b}
.lap-screen .mt-slides{border-radius:3px;box-shadow:none}
.lap-base{position:relative;height:clamp(9px,1.5vw,18px);margin:0 -8%;border-radius:0 0 14px 14px;
  background:linear-gradient(#d9d9d9,#a9a9a9 60%,#8d8d8d);box-shadow:0 30px 40px -18px rgba(40,30,15,.55)}
.lap-base::before{content:"";position:absolute;left:42%;right:42%;top:0;height:40%;border-radius:0 0 8px 8px;background:#9a9a9a}

/* the brochure, lying open on the table at an angle */
.mt-book .tilt{position:absolute;inset:0;transform:rotateX(32deg) rotateZ(-7deg) translateY(-3%);transform-style:preserve-3d}
.mt-book .bk{height:76%}

/* ---------- print: two squares, the brochure still on the left, the deck on the right ---------- */
.mt-print{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:none}
.mt-print > div{position:relative;overflow:hidden;aspect-ratio:1/1}
/* the brochure: the ECLIPSE spread lying open in window light, still */
.mt-spread{perspective:1600px}
.mt-spread .tilt{position:absolute;inset:0;transform:rotateX(30deg) rotateZ(-8deg) translateY(-2%);transform-style:preserve-3d}
.mt-spread .sp2{position:absolute;left:50%;top:50%;width:88%;aspect-ratio:1190/842;translate:-50% -50%;display:flex;
  box-shadow:0 34px 50px -26px rgba(50,36,15,.6)}
.mt-spread .sp2 img{display:block;width:50%;height:100%;object-fit:cover}
.mt-spread .sp2::after{content:"";position:absolute;left:44%;width:12%;top:0;bottom:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(0,0,0,0),rgba(0,0,0,.2) 48%,rgba(255,255,255,.12) 52%,rgba(0,0,0,0))}
.mt-spread.mt-lit::after{animation:none}
/* the deck: a column of slides that jumps fast to a slide, stops, and jumps again, up or down */
.mt-roll{background:#0b0b0b}
.mt-roll .col{position:absolute;left:4.5%;right:4.5%;top:0;display:flex;flex-direction:column;gap:12px;
  transition:transform .8s cubic-bezier(.76,0,.18,1)}
.mt-roll img{display:block;width:100%;height:auto;border-radius:6px}
/* a fade at the top and bottom, so the slides come out of the dark and the label stays readable */
.mt-roll::before,.mt-roll::after{content:"";position:absolute;left:0;right:0;height:16%;z-index:1;pointer-events:none}
.mt-roll::before{top:0;background:linear-gradient(#0b0b0b,rgba(11,11,11,0))}
.mt-roll::after{bottom:0;background:linear-gradient(rgba(11,11,11,0),#0b0b0b 75%)}

/* the brochure, held in a hand (a still photo) */
.mt-held{background:#0b0b0b}
.mt-held img{display:block;width:100%;height:100%;object-fit:cover}

/* ---------- Hello: the desktop in a browser window, the phone in front, light and dark in turn ---------- */
.mt-hello{aspect-ratio:16/11;background:#e4e2dd}
.hl-desk{position:absolute;left:5%;top:8%;width:76%;border-radius:10px;overflow:hidden;background:#fff;
  box-shadow:0 36px 70px -34px rgba(0,0,0,.45),0 0 0 1px rgba(0,0,0,.08)}
.hl-bar{display:flex;align-items:center;gap:6px;height:clamp(16px,2.4vw,28px);padding:0 12px;background:#e9e9e6}
.hl-bar i{width:8px;height:8px;border-radius:50%;background:#c6c6c2}
.hl-screen{position:relative}
.hl-screen img{display:block;width:100%;height:auto}
.hl-screen img.dark{position:absolute;inset:0;opacity:0;transition:opacity 1.1s ease}
.mt-hello.dark .hl-screen img.dark{opacity:1}
.hl-phone{position:absolute;right:6%;bottom:6%;width:21%;padding:6px;border-radius:clamp(18px,3vw,34px);background:#0b0b0b;
  box-shadow:0 40px 60px -30px rgba(0,0,0,.55),inset 0 0 0 1.5px #2a2a2a}
.hl-phone .hl-screen{border-radius:clamp(13px,2.4vw,28px);overflow:hidden;aspect-ratio:390/844}
.hl-phone .hl-screen img{height:100%;object-fit:cover;object-position:top}

/* ---------- social: three LinkedIn posts side by side ---------- */
.mt-li{display:flex;justify-content:center;align-items:flex-start;gap:5.5%;padding:7% 7% 8%;background:#e9ebee}
.li-card{flex:1 1 0;min-width:0;max-width:290px;border-radius:9px;background:#fff;color:#191919;
  box-shadow:0 0 0 1px rgba(0,0,0,.08),0 24px 40px -28px rgba(0,0,0,.35);
  font:400 clamp(9px,.9vw,13px)/1.4 -apple-system,"Segoe UI",Roboto,Arial,sans-serif;animation:li-float 6s ease-in-out var(--o) infinite alternate}
.mt-li:not(.go) .li-card{animation-play-state:paused}
@keyframes li-float{from{translate:0 -6px}to{translate:0 6px}}
.li-head{display:flex;gap:8px;padding:10px 12px 6px;align-items:flex-start}
.li-ava{display:grid;place-items:center;flex:none;width:2.8em;height:2.8em;border-radius:4px;background:#1f381d;color:#c9f166}
.li-ava svg{width:62%;height:62%}
.li-who{display:flex;flex-direction:column;min-width:0;line-height:1.3}
.li-who b{font-weight:600}
.li-who span{color:#666;font-size:.88em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li-head em{margin-left:auto;font-style:normal;color:#666;letter-spacing:1px}
.li-text{margin:0;padding:0 12px;height:2.8em;margin-bottom:10px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.li-text span{color:#666}
.li-img{position:relative;aspect-ratio:3/4;background:#ececec;overflow:hidden}
.li-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 1s ease}
.li-img img.on{opacity:1}
.li-react{display:flex;align-items:center;gap:6px;padding:8px 12px;color:#666;font-size:.88em;border-bottom:1px solid #e8e8e8}
.li-dots{display:flex}
.li-dots i{width:1.25em;height:1.25em;border-radius:50%;border:1.5px solid #fff;margin-left:-4px}
.li-dots i:first-child{margin-left:0;background:#378fe9}.li-dots i:nth-child(2){background:#44712e}.li-dots i:nth-child(3){background:#df704d}
.li-react .r{margin-left:auto}
.li-acts{display:grid;grid-template-columns:repeat(4,1fr);justify-items:center;align-items:center;padding:.7em 8px .8em;border-top:1px solid #e8e8e8;color:#5e5e5e}
.li-acts span{display:grid;place-items:center;width:2.2em;height:2.2em}
.li-acts svg{display:block;width:1.6em;height:1.6em}

@media (max-width:560px){
  .mt-li .li-card:nth-child(n+2){display:none}
  .li-card{max-width:78%;font-size:12px}
}

/* ---------- product images: one frame, many places ---------- */
.mt-scenes{aspect-ratio:16/9}
.mt-scenes img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;scale:1.06;
  transition:opacity 1.2s ease,scale 6s linear}
.mt-scenes img.on{opacity:1;scale:1}
/* a soft shade along the bottom, so the place names read on any picture */
.mt-scenes::after{content:"";position:absolute;left:0;right:0;bottom:0;height:34%;z-index:1;pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.55),rgba(0,0,0,0))}
/* the place names: one dark bar of buttons, the current place in Frog Green */
.mt-chips{position:absolute;left:clamp(12px,2vw,24px);bottom:clamp(12px,2vw,24px);z-index:2;display:flex;flex-wrap:wrap;gap:4px;
  max-width:calc(100% - 24px);padding:5px;border-radius:99px;background:rgba(18,18,18,.82);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 10px 30px -10px rgba(0,0,0,.6)}
.mt-chips button{position:relative;overflow:hidden;border:0;border-radius:99px;padding:11px 18px;
  background:none;color:#fefaf2;font:inherit;font-size:15px;line-height:1;cursor:pointer;
  transition:background-color .3s ease,color .3s ease}
.mt-chips button:hover{background:rgba(254,250,242,.14)}
.mt-chips button[aria-pressed="true"]{background:#c9f166;color:#121212}
.mt-chips button i{position:absolute;left:0;bottom:0;height:3px;width:100%;background:#1f381d;transform:scaleX(0);transform-origin:left}
.mt-chips.run button[aria-pressed="true"] i{transform:scaleX(1);transition:transform var(--t,4.2s) linear}

@media (max-width:560px){
  .mt-chips{gap:1px;padding:3px;left:8px;bottom:8px;max-width:calc(100% - 16px)}
  .mt-chips button{padding:7px 8px;font-size:11px}
  .mt-mascot .mt-cap,.mt-book .mt-cap{display:none}
  .mt-colours div{padding:10px 5px;font-size:9px}
}

@media (prefers-reduced-motion:reduce){
  .bk,.bk .leaf.turn,.mt-slides img{transition:none}
  .mt-scr > div{animation:none}
  .mt-lit::after,.li-card,.mt-roll .col{animation:none}
  .mt-roll{overflow-y:auto}
  .mt-colours.wait div{transform:none}.mt-colours.wait div *{opacity:1}
  .mt-mascot::before,.mg svg,.mg-brows{animation:none}.mg{transition:none}
  .mt-icons.wait path{stroke-dashoffset:0}
  .mt-track,.mt-scenes img{transition:none}
  .mt-scenes img{scale:1}
  .mt-wall{overflow-x:auto}
}

/* =======================================================================================
   Diary itself. It is drawn at its real size, 1440 x 900, and scaled to fit (magnotherm.js),
   so the type and spacing are the ones in the Figma file. The colours are the file's
   variables: one set for light, one for dark.
   ======================================================================================= */
.dy{position:absolute;left:0;top:0;width:1440px;height:900px;transform-origin:0 0;transform:scale(var(--s,1));
  display:grid;grid-template-columns:256px 1fr;padding:8px;gap:16px;
  font:400 14px/20px "Atkinson Hyperlegible Next",system-ui,sans-serif;letter-spacing:.01em;
  color:var(--fg);background:var(--page);-webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums;
  --page:#fff;--side:#f6f6f6;--card:#fff;--card-line:#e6e6e6;--fg:#121212;--muted:#5a5a5a;--line:#d8d8d8;
  --soft:#ececec;--strong:#929292;--accent:#1f381d;--tint:#e9f9c2;--sel:#1f381d;--avatar:#ececec;--danger:#c42d2d;
  --ok:#408139;--btn:#121212;--on:#fff;--tip:#fff;--tip-line:#e2e2e2;--badge:#408139;--badge-fg:#fff;--head:#f3f3f3;
  --c1:#7e5fce;--c2:#008e6d;--c3:#1937a9;--c4:#c42d2d;--bar:#929292;--gantt:#d9d9d9;--late:#f6d5d5}
.dy[data-theme="dark"]{--page:#121212;--side:#1e1e1e;--card:#1e1e1e;--card-line:#1e1e1e;--fg:#fefaf2;--muted:#929292;
  --line:#2e2e2e;--soft:#242424;--strong:#5a5a5a;--accent:#c9f166;--tint:#3a4520;--sel:#c9f166;--avatar:#2e2e2e;
  --danger:#e05656;--ok:#c9f166;--btn:#fefaf2;--on:#121212;--tip:#2a2a2a;--tip-line:#2a2a2a;--badge:#c9f166;
  --badge-fg:#121212;--head:#2a2a2a;--c1:#a184f7;--c2:#23d1ac;--c3:#d6c8fd;--c4:#e05656;--bar:#686868;--gantt:#3a3a3a;--late:#4a2626}
.dy *{box-sizing:border-box}
.dy.swap,.dy.swap *{transition:background-color .5s ease,color .5s ease,border-color .5s ease,fill .5s ease,stroke .5s ease,stop-color .5s ease !important}
.dy svg{display:block;overflow:visible}
.dy .ic{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* the sidebar */
.dy-side{display:flex;flex-direction:column;padding:14px 12px 14px;border-radius:12px;background:var(--side)}
.dy-brand{display:flex;align-items:center;gap:10px;height:28px;padding:0 4px;margin-bottom:18px}
.dy-brand .logo{width:110px;height:10px;color:var(--fg)}
.dy-brand .logo svg{width:100%;height:100%}
.dy-brand em{font-style:normal;padding-left:10px;border-left:1px solid var(--strong);line-height:14px}
.dy-brand .ic{margin-left:auto;color:var(--muted)}
.dy-nav{display:flex;flex-direction:column;gap:2px}
.dy-nav div{display:flex;align-items:center;gap:8px;height:32px;padding-left:calc(8px + var(--l,0) * 24px);padding-right:8px;
  border-radius:8px;color:var(--fg)}
.dy-nav div.b{font-weight:600}
.dy-nav div.m{color:var(--muted)}
.dy-nav div.sel{background:var(--tint);color:var(--sel);font-weight:600}
.dy-nav div .ic{color:var(--muted)}
.dy-nav div.sel .ic{color:var(--sel)}
.dy-nav .n{margin-left:auto;display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;
  background:var(--badge);color:var(--badge-fg);font-size:12px}
.dy-nav hr{border:0;border-top:1px solid var(--line);margin:6px 4px}
.dy-me{margin-top:auto;display:flex;flex-direction:column;gap:6px}
.dy-me div{display:flex;align-items:center;gap:10px;height:32px;padding:0 8px}
.av{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--avatar);color:var(--fg);
  font-size:10px;letter-spacing:.04em;font-weight:600;flex:none}
.av.s{width:22px;height:22px;font-size:9px}
.avs{display:flex}.avs .av + .av{margin-left:-4px;box-shadow:0 0 0 2px var(--card)}

/* the main area */
.dy-main{display:flex;flex-direction:column;min-width:0;padding:12px 16px 0 0}
.dy-top{display:flex;align-items:center;gap:10px;height:36px}
.dy-search{display:flex;align-items:center;gap:10px;width:280px;height:36px;padding:0 12px;border:1px solid var(--line);
  border-radius:8px;background:var(--page);color:var(--muted)}
.dy-round{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);margin-left:auto;cursor:pointer}
.btn{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 16px;border-radius:99px;border:1px solid var(--strong);
  color:var(--fg);font-weight:600;white-space:nowrap}
.btn.solid{background:var(--btn);border-color:var(--btn);color:var(--on)}
.pill{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 7px;border-radius:99px;background:var(--tint);color:var(--sel);font-size:12px}
.dy-crumb{margin-top:16px;font-size:12px;line-height:16px;color:var(--muted);letter-spacing:.025em}
.dy-head{display:flex;align-items:center;gap:10px;margin-top:2px;min-height:40px}
.dy-head h3{margin:0;font-size:28px;line-height:36px;font-weight:400;letter-spacing:0;display:flex;align-items:center;gap:8px}
.dy-head .r{margin-left:auto;display:flex;gap:8px}
.dy-meta{font-size:12px;line-height:16px;color:var(--muted);letter-spacing:.025em}
.dy-meta .late{color:var(--danger)}
.dy-ptabs{display:flex;gap:24px;margin-top:16px;border-bottom:1px solid var(--line)}
.dy-ptabs span{padding:0 2px 10px;color:var(--muted)}
.dy-ptabs span.on{color:var(--fg);font-weight:600;box-shadow:inset 0 -2px 0 var(--fg)}

.dcard{border:1px solid var(--card-line);border-radius:12px;background:var(--card);padding:20px 24px;min-width:0;position:relative}
.dcard h4{margin:0;font-size:16px;line-height:24px;font-weight:600}
.dcard h4.big{font-size:24px;line-height:32px;font-weight:400}
.dy-screen{position:relative;display:flex;flex-direction:column;gap:16px;margin-top:18px;min-height:0;flex:1}
.dy-screen[hidden]{display:none}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* KPI row */
.kpis{display:grid;grid-template-columns:1fr 1fr 1fr 220px;margin-top:20px}
.kpi{padding-right:20px;margin-right:20px;border-right:1px solid var(--line)}
.kpi:last-child{border-right:0;margin-right:0}
.kpi .k{display:flex;align-items:center;gap:8px}
.kpi .k i,.leg i,.key i{width:8px;height:8px;border-radius:50%;background:var(--c);flex:none;display:inline-block}
.kpi .s{font-size:12px;line-height:16px;color:var(--muted);letter-spacing:.025em;margin-top:2px}
.kpi .v{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:36px;line-height:44px;font-weight:300;letter-spacing:-.01em}
.kpi .v .ic{width:18px;height:18px}
.up{color:var(--ok)}.dn{color:var(--danger)}
.chg{font-size:12px;line-height:16px;letter-spacing:.025em}
.chg div{display:flex;justify-content:space-between;color:var(--muted);height:16px;margin-top:4px}
.chg div:first-child{color:var(--fg);font-size:14px;font-weight:600;height:20px;margin:0 0 4px}
.chg span{display:flex;align-items:center;gap:4px}
.chg .ic{width:12px;height:12px}
.axis{font-size:11px;fill:var(--muted);letter-spacing:.02em}
.dgrid{stroke:var(--soft);stroke-width:1}
.base{stroke:var(--line);stroke-width:1}

/* the hover box over a chart */
.tip{position:absolute;padding:12px 14px;border-radius:8px;background:var(--tip);border:1px solid var(--tip-line);
  box-shadow:0 8px 24px -12px rgba(0,0,0,.35);font-size:12px;line-height:16px;letter-spacing:.02em}
.tip b{display:block;font-size:14px;line-height:20px;font-weight:600;letter-spacing:.01em}
.tip .d{color:var(--muted);margin:2px 0 6px}
.tip div.r{display:flex;align-items:center;gap:8px;height:20px}
.tip div.r em{margin-left:auto;font-style:normal;padding-left:28px}

/* bars and lists */
.stackbar{display:flex;gap:4px;height:14px;margin-top:18px}
.stackbar i{border-radius:2px;background:linear-gradient(90deg,color-mix(in srgb,var(--c) 45%,transparent),var(--c))}
.leg{margin-top:14px}
.leg div{display:flex;align-items:center;gap:10px;height:28px}
.leg em{margin-left:auto;font-style:normal;color:var(--muted)}
.leg b{width:44px;text-align:right;font-weight:600}
.yield div{margin-top:12px}
.yield .t{display:flex;justify-content:space-between;font-size:12px;line-height:16px;color:var(--muted);letter-spacing:.025em}
.yield .t b{color:var(--fg);font-size:14px;font-weight:600}
.yield .tr{height:4px;margin-top:4px;border-radius:2px;background:var(--soft)}
.yield .tr i{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,transparent,var(--bar))}
.yield div:first-child .tr i{background:linear-gradient(90deg,color-mix(in srgb,var(--c1) 35%,transparent),var(--c1))}

/* tables */
.tbl{width:100%;border-collapse:collapse;margin-top:14px}
.tbl th{text-align:left;font-weight:600;height:36px;padding:0 10px;background:var(--head)}
.tbl th:first-child{border-radius:6px 0 0 6px}.tbl th:last-child{border-radius:0 6px 6px 0}
.tbl td{height:44px;padding:0 10px;border-bottom:1px solid var(--soft)}
.tbl tr.hl td{background:color-mix(in srgb,var(--tint) 70%,transparent)}
.tbl .late{color:var(--danger)}

/* the Gantt chart */
.gantt{display:grid;grid-template-columns:268px 1fr;margin-top:14px;font-size:13px}
.gantt .h{display:contents}
.gantt .h > *{height:32px;background:var(--head);display:flex;align-items:center}
.gantt .h > :first-child{padding-left:10px;font-weight:600;border-radius:6px 0 0 6px}
.gantt .h > :last-child{border-radius:0 6px 6px 0;position:relative}
.gantt .mo{position:absolute;top:8px;font-size:12px;color:var(--muted);transform:translateX(-50%)}
.gantt .mo.y{color:var(--fg);font-weight:600}
.gantt .r{display:contents}
.gantt .r > *{height:28px;border-bottom:1px solid var(--soft);display:flex;align-items:center}
.gantt .r > :first-child{padding-left:calc(10px + var(--l,0) * 16px);gap:8px}
.gantt .r > :last-child{position:relative}
.gantt .r.g > :first-child{font-weight:600}
.gantt .r.hl > *{background:color-mix(in srgb,var(--tint) 70%,transparent)}
.gantt .r.ms > *{background:var(--soft);font-size:12px;color:var(--muted)}
.gantt .gbar{position:absolute;top:8px;height:12px;border-radius:3px;background:var(--gantt)}
.gantt .gbar.grp{top:12px;height:4px;border-radius:2px;background:var(--fg)}
.gantt .gbar.pu{background:linear-gradient(90deg,color-mix(in srgb,var(--c1) 30%,transparent),var(--c1))}
.gantt .gbar.late{background:var(--late);border:1px solid var(--danger)}
.gantt .gbar.out{background:color-mix(in srgb,var(--ok) 25%,transparent);border:1.5px solid var(--fg)}
.gantt .dia{position:absolute;top:9px;width:9px;height:9px;rotate:45deg;background:#e8a33c;border:1px solid #9a6514}
.tag{display:inline-block;padding:0 6px;height:18px;line-height:18px;border-radius:4px;background:var(--late);color:var(--danger);font-size:11px}
.today{position:absolute;top:0;bottom:0;width:1.5px;background:var(--accent);z-index:1}
.today b{position:absolute;top:-2px;left:6px;font-size:11px;font-weight:400;color:var(--fg);white-space:nowrap}

/* the task board */
.dtools{display:flex;align-items:center;gap:12px}
.dtools .find{display:flex;align-items:center;gap:8px;width:240px;height:36px;padding:0 12px;border:1px solid var(--line);border-radius:8px;color:var(--muted)}
.seg{display:flex;padding:3px;border-radius:99px;border:1px solid var(--line)}
.seg span{display:flex;align-items:center;gap:6px;height:28px;padding:0 12px;border-radius:99px}
.seg span.on{background:var(--btn);color:var(--on)}
.cols{display:grid;grid-template-columns:repeat(5,1fr);gap:16px;margin-top:4px}
.col h5{margin:0 0 10px;font-size:14px;font-weight:600}
.col h5 span{font-weight:400;color:var(--muted);margin-left:6px}
.tk{border:1px solid var(--line);border-radius:8px;padding:12px;margin-bottom:10px;background:var(--card)}
.tk.hl{background:var(--tint);border-color:color-mix(in srgb,var(--ok) 50%,transparent)}
.tk p{margin:0 0 10px;display:flex;gap:10px}
.tk p i{width:16px;height:16px;border:1.5px solid var(--strong);border-radius:3px;flex:none;margin-top:2px}
.tk .f{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);padding-left:26px}
.tk .f .late{color:var(--danger)}
.dmore{font-size:12px;color:var(--muted)}

/* what moves when a screen comes in: lines draw, areas and boxes fade, bars grow, cards rise */
.dy .ln{stroke-dasharray:1;stroke-dashoffset:1}
.dy .ar,.dy .tip,.dy .dot{opacity:0}
.dy .gx{transform:scaleX(0);transform-origin:0 50%;transform-box:fill-box}
.dy .rise{opacity:0;transform:translateY(12px)}
.dy.go .ln{stroke-dashoffset:0;transition:stroke-dashoffset 1.5s cubic-bezier(.3,.7,.2,1) var(--d,0s)}
.dy.go .ar{opacity:1;transition:opacity 1s ease calc(var(--d,0s) + .5s)}
.dy.go .dot{opacity:1;transition:opacity .3s ease 1.5s}
.dy.go .tip{opacity:1;transition:opacity .4s ease 1.6s}
.dy.go .gx{transform:none;transition:transform 1.1s var(--e,cubic-bezier(.3,.7,.2,1)) var(--d,0s)}
.dy.go .rise{opacity:1;transform:none;transition:opacity .6s ease var(--d,0s),transform .7s cubic-bezier(.3,.7,.2,1) var(--d,0s)}
@media (prefers-reduced-motion:reduce){
  .dy .ln{stroke-dashoffset:0}.dy .ar,.dy .tip,.dy .dot,.dy .rise{opacity:1;transform:none}.dy .gx{transform:none}
}
.dy.still,.dy.still *{transition:none !important}
