/* Progressive enhancement of CONTENTS only. Original copy and diagrams stay intact. */
#contents.cs-ready{overflow:visible}
#contents.cs-ready .cs-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8%;align-items:start}
#contents.cs-ready .k1-feature-grid{display:block;min-width:0}
#contents.cs-ready .k1-feature-card,#contents.cs-ready .k1-feature-card:nth-child(2),#contents.cs-ready .k1-feature-card:nth-child(3){display:flex;flex-direction:column;justify-content:center;align-items:stretch;min-height:max(680px,85svh);gap:24px;margin:0;padding:70px 0 100px;border:0;border-bottom:1px solid #063c3330;opacity:1;transform:none}
#contents.cs-ready .k1-feature-card:last-child{border-bottom:0}
#contents.cs-ready .k1-feature-copy{min-height:0;padding:0}
#contents.cs-ready .k1-feature-copy h3,#contents.cs-ready .k1-feature-card:nth-child(2) .k1-feature-copy h3{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-size:clamp(25px,2.5vw,38px);line-height:1.65;font-weight:700;min-height:0;padding:24px 0;letter-spacing:.02em;overflow-wrap:normal}
#contents.cs-ready .k1-feature-copy h3 .contents-title-part{white-space:normal;display:block}
#contents.cs-ready .factoring-description{font-size:16px;line-height:2.1;padding-top:0;max-width:31em}
#contents.cs-ready .k1-feature-image,#contents.cs-ready .k1-feature-card:nth-child(2) .k1-feature-image{width:100%;max-width:none;transform:none}
#contents.cs-ready .k1-feature-image>img{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#contents.cs-ready .diagram-notes{min-height:0;padding:0;text-align:left}
#contents .cs-visual{position:sticky;top:180px;padding:26px 0;pointer-events:none}
#contents .cs-top{display:flex;justify-content:space-between;gap:20px;padding:0 0 18px;border-bottom:1px solid #063c3330;font:12px/1.5 Arial,sans-serif;letter-spacing:.12em;color:#366457}
#contents .cs-art{position:relative;aspect-ratio:480/350;margin:34px 0 24px}
#contents .cs-layer{position:absolute;inset:0;opacity:0;transform:translateY(18px);transition:opacity .5s ease,transform .65s ease}
#contents .cs-layer img{display:block;width:100%;height:100%;object-fit:contain}
#contents[data-active="0"] [data-layer="0"],#contents[data-active="1"] [data-layer="1"],#contents[data-active="2"] [data-layer="2"]{opacity:1;transform:none}
#contents .cs-label{font:700 18px/1.7 -apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;letter-spacing:.02em;color:#063c33;margin:0}
#contents .cs-progress{display:flex;gap:8px;margin-top:24px}
#contents .cs-progress i{height:2px;flex:1;background:#063c3320}
#contents[data-active="0"] .cs-progress i:nth-child(1),#contents[data-active="1"] .cs-progress i:nth-child(2),#contents[data-active="2"] .cs-progress i:nth-child(3){background:#063c33}
html.motion-paused #contents .cs-layer{transition:none}
@media(prefers-reduced-motion:reduce){#contents .cs-layer{transition:none}}
@media(max-width:900px),(max-height:650px){
 #contents.cs-ready .cs-layout{display:block}
 #contents .cs-visual{display:none}
 #contents.cs-ready .k1-feature-card,#contents.cs-ready .k1-feature-card:nth-child(2),#contents.cs-ready .k1-feature-card:nth-child(3){min-height:0;padding:40px 0 48px;gap:28px}
 #contents.cs-ready .k1-feature-image>img{position:static;width:100%;height:auto;clip-path:none}
 #contents.cs-ready .k1-feature-image,#contents.cs-ready .k1-feature-card:nth-child(2) .k1-feature-image{max-width:540px;align-self:center}
 #contents.cs-ready .diagram-notes{padding-top:20px}
 #contents.cs-ready .k1-feature-copy h3{font-size:clamp(23px,4vw,32px)}
 #contents.cs-ready .factoring-description{font-size:15px}
}
@media(min-width:901px) and (min-height:651px) and (max-height:800px){#contents .cs-visual{top:145px}#contents .cs-art{max-height:280px;margin:20px 0}#contents .cs-progress{margin-top:16px}}

/* Mobile: keep the same scroll-linked diagrams, above readable full-width copy. */
@media(max-width:900px) and (min-height:501px){
 #contents.cs-ready .cs-layout{display:flex;flex-direction:column;gap:0}
 #contents.cs-ready .k1-feature-grid{width:100%}
 #contents.cs-ready .cs-visual{display:block;order:-1;position:sticky;top:var(--cs-mobile-top,150px);width:100%;padding:10px 0 14px;background:var(--cs-background,#f5f4ee);z-index:2;border-bottom:1px solid #063c3330}
 #contents.cs-ready .cs-top{font-size:10px;padding-bottom:8px;gap:8px}
 #contents.cs-ready .cs-art{height:clamp(120px,25svh,230px);aspect-ratio:auto;margin:10px 0}
 #contents.cs-ready .cs-label{font-size:14px;line-height:1.6;min-height:3.2em}
 #contents.cs-ready .cs-progress{margin-top:10px}
 #contents.cs-ready .k1-feature-card,#contents.cs-ready .k1-feature-card:nth-child(2),#contents.cs-ready .k1-feature-card:nth-child(3){min-height:75svh;justify-content:flex-start;padding:32px 0 64px;gap:20px}
 #contents.cs-ready .k1-feature-image>img{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #contents.cs-ready .k1-feature-image,#contents.cs-ready .k1-feature-card:nth-child(2) .k1-feature-image{width:100%;max-width:none}
 #contents.cs-ready .diagram-notes{padding-top:0}
}
