/* Grade 5 visual studio. Shared models use these colors in the gallery and lessons. */
.emc{--studio-navy:#173650;--studio-teal:#087f86;--studio-coral:#e16a51;--studio-gold:#ecaa35;--studio-violet:#7455b3;--studio-paper:#fffdf7}
.emc-model-showcase{max-width:1220px;padding-top:22px}
.emc-model-showcase .emc-head{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,360px);
  column-gap:35px;align-content:center;min-height:345px;padding:clamp(30px,5vw,58px);
  overflow:hidden;color:#fff;border-radius:28px;
  background:radial-gradient(circle at 78% 12%,#255e75 0,transparent 31%),linear-gradient(130deg,#102d46 10%,#176b74 100%);
  box-shadow:0 20px 44px rgba(16,45,70,.15)
}
.emc-model-showcase .emc-head::before{content:"";position:absolute;right:-70px;bottom:-130px;width:420px;height:420px;border:1px solid rgba(255,255,255,.16);border-radius:50%;box-shadow:0 0 0 35px rgba(255,255,255,.035),0 0 0 78px rgba(255,255,255,.025)}
.emc-model-showcase .emc-head>*:not(.emc-hero-art){position:relative;z-index:1;grid-column:1;text-align:left}
.emc-model-showcase .emc-head .emc-kicker{color:#96e9dc;margin-bottom:18px!important}
.emc-model-showcase .emc-head h1{color:#fff;font-size:clamp(2.35rem,4.4vw,4.1rem);line-height:1.08;letter-spacing:-.045em;max-width:660px;margin:0 0 19px}
.emc-model-showcase .emc-head>p:not(.emc-kicker){color:#dcecf1;max-width:620px;font-size:1.08rem;line-height:1.65;margin:0 0 26px}
.emc-model-showcase .emc-head>.emc-button{justify-self:start;background:#f6b94c;color:#173650!important;border-radius:12px;padding:13px 19px;box-shadow:0 7px 0 rgba(7,32,46,.25)}
.emc-model-showcase .emc-head>.emc-button:hover{background:#ffd076}
.emc-hero-art{grid-column:2;grid-row:1/5;position:relative;z-index:1;align-self:center;display:grid;gap:13px;transform:rotate(3deg)}
.emc-hero-art-top,.emc-hero-art-bottom{background:#fff;border-radius:21px;box-shadow:0 14px 25px rgba(0,20,35,.2);color:#173650;padding:19px 22px}
.emc-hero-art-top{transform:rotate(-5deg)}
.emc-hero-art-label{display:block;color:#46677a;font-size:.75rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.emc-hero-art-top strong{font-size:2.4rem;line-height:1.25}
.emc-hero-fraction{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;height:36px;margin-top:9px}
.emc-hero-fraction i{background:#f4b54b;border-radius:6px;box-shadow:inset 0 -5px 0 rgba(151,81,9,.15)}
.emc-hero-fraction i:last-child{background:#f1f3f3;box-shadow:inset 0 0 0 2px #d3dfe3}
.emc-hero-art-bottom{display:flex;align-items:center;gap:11px;transform:translateX(17px) rotate(3deg)}
.emc-hero-art-bottom>span{font-size:.75rem;font-weight:800;max-width:54px;line-height:1.15;color:#46677a}
.emc-hero-art-bottom strong{white-space:nowrap;font-size:1.13rem}
.emc-hero-cubes{display:grid;grid-template-columns:repeat(4,13px);gap:2px}
.emc-hero-cubes i{width:13px;height:13px;background:#49abb0;border-radius:2px;box-shadow:inset -3px -3px 0 #287a84}

.emc-model-showcase .emc-model-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 35px}
.emc-model-showcase .emc-model-nav a{display:flex;align-items:center;gap:9px;min-height:70px;padding:10px 13px;border:1px solid #d9e3e5;border-radius:15px;background:#fff;color:#24455b;text-decoration:none;box-shadow:0 3px 12px rgba(20,51,78,.05);line-height:1.25}
.emc-model-showcase .emc-model-nav a:hover,.emc-model-showcase .emc-model-nav a:focus-visible{border-color:#7cbcc0;background:#f0fbf8;transform:translateY(-2px)}
.emc-model-nav a span{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#dbf4ef;color:#087f86;font-weight:900}
.emc-model-nav a strong{font-size:.84rem}
.emc-model-showcase .emc-model-group{display:flex;align-items:center;gap:13px;margin:49px 0 17px;padding:0 0 13px;border-bottom:2px solid #d7e5e6;font-size:clamp(1.45rem,2.6vw,2rem);letter-spacing:-.02em;scroll-margin-top:85px}
.emc-model-group span{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border-radius:10px;background:#173650;color:#fff;font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.emc-model-group small{margin-left:auto;font-size:.72rem;color:#547080;font-weight:800;white-space:nowrap}
.emc-model-showcase{counter-reset:model}
.emc-model-showcase .emc-model-section{
  --model-accent:#087f86;--model-wash:#edf9f6;
  counter-increment:model;display:grid;grid-template-columns:minmax(170px,210px) minmax(0,1fr);
  column-gap:24px;align-items:start;padding:25px;margin:0 0 18px;border:1px solid #e0e8e8;
  border-left:6px solid var(--model-accent);border-radius:22px;background:linear-gradient(125deg,var(--model-wash),#fff 38%);
  box-shadow:0 10px 25px rgba(20,51,78,.055)
}
.emc-model-section[data-unit="2"],.emc-model-section[data-unit="8"]{--model-accent:#d17d28;--model-wash:#fff6e8}
.emc-model-section[data-unit="3"],.emc-model-section[data-unit="7"]{--model-accent:#087f86;--model-wash:#ecfaf7}
.emc-model-section[data-unit="4"],.emc-model-section[data-unit="5"]{--model-accent:#7857b1;--model-wash:#f4f0ff}
.emc-model-section[data-unit="6"],.emc-model-section[data-unit="9"]{--model-accent:#cc624e;--model-wash:#fff1ed}
.emc-model-section[data-unit="10"]{--model-accent:#2576aa;--model-wash:#edf6fc}
.emc-model-showcase .emc-model-intro{grid-column:1;align-self:start}
.emc-model-showcase .emc-model-intro>h2{margin:0 0 9px;font-size:1.5rem;line-height:1.2;letter-spacing:-.025em}
.emc-model-intro>h2::before{content:"MODEL " counter(model,decimal-leading-zero);display:block;margin:0 0 11px;color:var(--model-accent);font-size:.7rem;font-weight:900;letter-spacing:.13em}
.emc-model-showcase .emc-model-intro>p{margin:0;color:#526b78;font-size:.95rem;line-height:1.55}
.emc-model-showcase .emc-model-section>.emc-lab{grid-column:2;grid-row:1;width:100%;max-width:none;margin:0}

.emc .emc-lab{--model-accent:#087f86;border:1px solid #d8e5e5;border-radius:21px;background:#fff;padding:clamp(20px,3vw,29px);box-shadow:0 12px 28px rgba(20,51,78,.075);overflow:hidden}
.emc-model-section .emc-lab{--model-accent:inherit}
.emc .emc-lab figcaption{text-align:left;padding:0 0 17px;margin:0 0 19px;border-bottom:1px solid #e3ebeb}
.emc .emc-lab figcaption::before{content:"INTERACTIVE MODEL";display:block;margin-bottom:6px;color:#0b777e;font-size:.67rem;font-weight:900;letter-spacing:.15em}
.emc .emc-lab figcaption strong{color:#173650;font-size:1.28rem;line-height:1.2}
.emc .emc-lab figcaption span{font-size:.88rem;line-height:1.5}
.emc .emc-lab>p:first-of-type:not(.emc-model-equation):not(.emc-expression){color:#3e5867}
.emc .emc-model-equation,.emc .emc-expression{font-size:clamp(1.5rem,2.6vw,2rem);letter-spacing:-.03em;color:#173650;font-variant-numeric:tabular-nums}
.emc .emc-lab button:not(.emc-area-piece):not(.emc-place-cell){transition:background .16s,transform .16s,box-shadow .16s}
.emc .emc-lab button:hover{transform:translateY(-2px)}
.emc .emc-lab .emc-lab-reveal{background:#173650;color:#fff!important;box-shadow:0 4px 0 #0b2438;margin:17px 10px 17px 0}
.emc .emc-lab .emc-lab-reveal:hover{background:#245675}
.emc .emc-lab .emc-lab-check{background:#087f86;color:#fff!important;box-shadow:0 4px 0 #07575a}
.emc .emc-lab .emc-lab-check:hover{background:#0b6b70}
.emc .emc-lab-control{display:block;margin-top:18px!important;color:#29485b}
.emc .emc-lab input[type=number],.emc .emc-lab input[type=text]{font-size:1.16rem;font-weight:750;font-variant-numeric:tabular-nums;border:2px solid #b7ced4;border-radius:11px;max-width:320px}
.emc .emc-lab input[type=number]:focus,.emc .emc-lab input[type=text]:focus{border-color:#087f86;box-shadow:0 0 0 4px #c7eee8}
.emc .emc-lab-feedback{display:flex;align-items:center;gap:10px;min-height:53px;margin-top:22px!important;border:1px solid #d6e9e8;background:#f2faf8;color:#285760;font-size:.91rem}
.emc .emc-lab-feedback::before{content:"?";flex:none;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#d9eeea;color:#176d71;font-weight:900}
.emc .emc-lab-feedback[data-state=correct]{background:#e9f7ee;border-color:#b9dec5;color:#215e39}
.emc .emc-lab-feedback[data-state=correct]::before{content:"✓";background:#bce7c8;color:#19592e}
.emc .emc-lab-feedback[data-state=hint]{background:#fff8e7;border-color:#f1dbab;color:#674e18}
.emc .emc-lab-feedback[data-state=hint]::before{content:"!";background:#ffe7a9;color:#765012}

/* Bigger diagrams with distinct visual meanings for each color. */
.emc .emc-hundred-grid,.emc .emc-decimal-grid,.emc .emc-fraction-area-grid{
  width:min(100%,450px);margin:17px auto 20px;gap:3px;border:7px solid #d7e6e7;
  background:#d7e6e7;border-radius:15px;box-shadow:0 8px 20px rgba(23,54,80,.10)
}
.emc .emc-hundred-cell,.emc .emc-decimal-cell,.emc .emc-fraction-area-cell{border-radius:2px}
.emc .emc-decimal-cell.is-first,.emc .emc-hundred-cell.is-filled{background:#10999a}
.emc .emc-decimal-cell.is-second{background:#f2ae47}
.emc .emc-decimal-cell.is-overlap,.emc .emc-fraction-area.is-revealed .emc-fraction-area-cell.is-column.is-row{background:#7551b1}
.emc .emc-fraction-area-cell.is-column{background:#c8eae7}
.emc .emc-fraction-area-cell.is-row{background:#ffe6b2}
.emc .emc-fraction-bar{gap:13px;max-width:none;margin:17px 0}
.emc .emc-fraction-bar>span{flex:none;width:86px;color:#29485b;font-size:.95rem}
.emc .emc-fraction-pieces{height:60px;background:#c9dadd;border-color:#c9dadd;border-radius:10px;gap:3px;box-shadow:0 5px 0 #dce8e9}
.emc .emc-fraction-pieces span.is-filled{background:#7551b1}
.emc .emc-fraction-bar:nth-of-type(even) .emc-fraction-pieces span.is-filled{background:#efad45}
.emc .emc-upgrade-bars{max-width:none;gap:13px;padding:18px;margin:20px 0;background:var(--studio-paper);border:1px solid #eee4ce;border-radius:17px}
.emc .emc-upgrade-bar{gap:13px}
.emc .emc-upgrade-bar>strong{min-width:112px;color:#29485b}
.emc .emc-upgrade-ten{max-width:none;height:51px;background:#c7dada;border-color:#c7dada;border-radius:10px;gap:3px}
.emc .emc-upgrade-ten i{border-radius:2px}
.emc .emc-upgrade-ten i.is-filled,.emc .emc-decimal-whole.is-revealed .emc-upgrade-ten i.is-filled{background:#0c9a9d}
.emc .emc-upgrade-bar:nth-child(2) .emc-upgrade-ten i.is-filled{background:#f0a844}
.emc .emc-upgrade-bar:nth-child(3) .emc-upgrade-ten i.is-filled{background:#8064bf}
.emc .emc-upgrade-bar:nth-child(4) .emc-upgrade-ten i.is-filled{background:#dc7658}
.emc .emc-mixed-tile{width:58px;height:47px;background:#f0ae50;border-color:#cf8732;border-radius:8px;color:#573612;box-shadow:inset -5px -5px 0 rgba(134,77,22,.16),0 4px 0 #d6ad74}
.emc .emc-mixed-tile.is-quarter{background:#d9d3ef;border-color:#8564b9}
.emc .emc-mixed-tile.is-quarter i{display:block;width:100%;height:100%;justify-self:stretch}
.emc .emc-mixed-tile.is-quarter i.is-filled{background:#8462bd}
.emc .emc-trade-visual[hidden]{display:none!important}
.emc .emc-trade-visual{display:grid;gap:12px;margin:4px 0 22px;padding:17px;background:#eff9f5;border:2px solid #a8d7c5;border-radius:14px;color:#245848}
.emc .emc-trade-pieces{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.emc .emc-trade-pieces .emc-upgrade-ten{flex:1 1 210px;max-width:360px}
.emc .emc-trade-whole{display:grid;place-items:center;width:78px;height:51px;border-radius:9px;background:#f1b64e;color:#583b17;font-size:.78rem;font-weight:900;box-shadow:inset -6px -6px 0 #dc9840}
.emc .emc-upgrade-groups button{min-height:80px;background:#f4fbfa;color:#0a6066!important;border-color:#9acccc;border-radius:14px;box-shadow:0 5px 0 #d7e8e7}
.emc .emc-upgrade-groups button.is-selected{background:#c6eee8;border-color:#087f86}
.emc .emc-upgrade-groups button span{font-size:1.1rem;color:#0b9294}
.emc .emc-upgrade-cubes{gap:4px;padding:6px;background:#c4dadc}
.emc .emc-upgrade-cubes i{width:34px;height:34px;background:#3aa2ba;box-shadow:inset -6px -6px 0 #287b99,inset 3px 3px 0 #90d6e1}
.emc .emc-prism-stack{position:relative;display:inline-block;padding:14px 14px 0 0}
.emc .emc-prism-stack>.emc-upgrade-cubes:not(.emc-prism-back){position:relative;z-index:1}
.emc .emc-prism-stack>.emc-prism-back{position:absolute;top:0;left:14px;opacity:.68}
.emc .emc-prism-back i{background:#80bfce}
.emc .emc-volume-layer{width:min(100%,380px);gap:5px;padding:6px;margin:17px auto;border:0;background:#cbdcde;border-radius:13px;box-shadow:0 7px 0 #b2cdcf}
.emc .emc-volume-layer span{border-radius:3px}
.emc .emc-volume-layer.is-filled span{background:#4aa8bc;box-shadow:inset -7px -7px 0 #277d95,inset 3px 3px 0 #9bd9e3}
.emc .emc-coordinate-grid{width:min(100%,420px);margin:27px auto 34px;background-color:#f8fcfb;background-image:linear-gradient(to right,#d0e4e4 1px,transparent 1px),linear-gradient(to top,#d0e4e4 1px,transparent 1px);border-color:#245879;box-shadow:0 10px 25px rgba(23,54,80,.08)}
.emc .emc-coordinate-marker{width:22px;height:22px;background:#e16a51;box-shadow:0 0 0 3px #a84735,0 0 0 7px rgba(225,106,81,.16)}
.emc .emc-plot-ticks{max-width:none;border-bottom:4px solid #087f86}
.emc .emc-plot-ticks button{min-height:140px;background:#f1f9f7;border-color:#b5dad6}
.emc .emc-plot-marks{color:#e16a51;font-size:1.55rem}
.emc .emc-division-area-wrap{max-width:none;height:145px;border:3px solid #287e87;border-radius:12px;overflow:hidden;box-shadow:0 7px 0 #d0e4e4}
.emc .emc-division-area-main{background:#bce9e4}
.emc .emc-division-area-rest{background:#ffdf9c;border-left:3px solid #287e87}
.emc .emc-division-area-wrap strong{font-size:1.2rem}
.emc .emc-choice-row button,.emc .emc-upgrade-tree button{background:#f2f7f8;color:#1d4a5f!important;border:2px solid #b8d2d6;border-radius:12px;min-height:52px}
.emc .emc-choice-row button.is-selected,.emc .emc-upgrade-tree button.is-selected{background:#cbede6;border-color:#087f86}
.emc .emc-pattern-table{max-width:none;border-collapse:separate;border-spacing:0;overflow:hidden;border:1px solid #cbdcde;border-radius:11px}
.emc .emc-pattern-table th{background:#dff1ef;color:#154e56}
.emc .emc-pattern-table th,.emc .emc-pattern-table td{padding:12px 14px}
.emc .emc-upgrade-step,.emc .emc-place-trade{border-left:5px solid #e8a340;border-radius:0 10px 10px 0;background:#fff7e6;color:#4d4b35;padding:13px 16px}
.emc .emc-water-story{display:flex;align-items:center;justify-content:space-between;gap:7px;max-width:770px;margin:21px auto;padding:17px 13px;background:#eff8f8;border:1px solid #c6e1e1;border-radius:16px}
.emc .emc-water-stage{flex:1 1 0;min-width:0;text-align:center}
.emc .emc-water-stage>strong{display:block;color:#14546b;font-size:.81rem}
.emc .emc-water-stage>span{display:block;min-height:2.8em;margin-top:6px;color:#38596a;font-size:.73rem;line-height:1.3}
.emc .emc-water-pair{display:flex;justify-content:center;align-items:flex-end;gap:7px;height:109px;margin-top:10px}
.emc .emc-water-glass{position:relative;display:block;width:51px;height:85px;overflow:hidden;border:3px solid #548895;border-top:5px solid #548895;border-radius:6px 6px 12px 12px;background:repeating-linear-gradient(to top,transparent 0,transparent 18px,#d2e5e7 19px,#d2e5e7 20px);box-shadow:inset 0 0 0 2px #fff}
.emc .emc-water-glass i{position:absolute;left:2px;right:2px;bottom:2px;height:var(--fill);max-height:calc(100% - 4px);background:linear-gradient(#7fd3d1,#22a6b3);border-radius:2px 2px 8px 8px;transition:height .35s}
.emc .emc-water-arrow{flex:none;align-self:center;margin-top:14px;color:#d17d28;font-size:1.5rem;font-weight:900}
.emc .emc-water-after .emc-water-glass i{height:0}
.emc .emc-line-plot-share.is-revealed .emc-water-after .emc-water-glass i{height:var(--fill)}
.emc .emc-upgrade-tree{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:22px 0}
.emc .emc-upgrade-tree button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:150px;padding:12px 8px;text-align:center}
.emc .emc-upgrade-tree button strong{display:block;margin-top:10px;font-size:.88rem;line-height:1.15}
.emc .emc-upgrade-tree button small{display:block;margin-top:5px;font-size:.68rem;line-height:1.2;font-weight:650}
.emc .emc-upgrade-tree button:not(:last-child)::after{content:"→";position:absolute;right:-14px;top:52%;z-index:2;color:#b66936;font-size:1.5rem;font-weight:900}
.emc .emc-shape-icon{display:block;flex:none;width:46px;height:39px;border:4px solid #7455b3;background:#e5dbfb}
.emc .emc-shape-quad{position:relative;border:0;background:#7455b3;clip-path:polygon(15% 0,100% 14%,82% 100%,0 79%)}
.emc .emc-shape-quad::after{content:"";position:absolute;inset:5px;background:#e5dbfb;clip-path:polygon(15% 0,100% 14%,82% 100%,0 79%)}
.emc .emc-shape-parallel{transform:skewX(-18deg)}
.emc .emc-shape-rectangle{width:49px;height:32px}
.emc .emc-shape-square{width:39px;height:39px}
.emc .emc-upgrade-tree button.is-selected .emc-shape-icon{background:#8164c0;border-color:#62449f}

@media(max-width:960px){
  .emc-model-showcase .emc-model-nav{grid-template-columns:repeat(2,minmax(0,1fr))}
  .emc-model-showcase .emc-model-section{grid-template-columns:1fr;gap:0}
  .emc-model-showcase .emc-model-section>.emc-lab{grid-column:1;grid-row:auto;margin-top:19px}
}
@media(max-width:650px){
  .emc-model-showcase{padding:16px 12px 45px}
  .emc-model-showcase .emc-head{grid-template-columns:1fr;min-height:0;padding:28px 24px;border-radius:20px}
  .emc-model-showcase .emc-head h1{font-size:2.45rem}
  .emc-hero-art{grid-column:1;grid-row:auto;max-width:310px;margin-top:22px;transform:rotate(0)}
  .emc-hero-art-bottom{transform:translateX(10px) rotate(2deg)}
  .emc-model-showcase .emc-model-nav{gap:7px}
  .emc-model-showcase .emc-model-nav a{min-height:67px;padding:8px;font-size:.78rem}
  .emc-model-nav a span{width:27px;height:27px}
  .emc-model-nav a strong{font-size:.74rem}
  .emc-model-showcase .emc-model-group{gap:8px;flex-wrap:wrap}
  .emc-model-group small{width:100%;margin-left:0}
  .emc-model-showcase .emc-model-section{padding:17px;border-radius:17px}
  .emc .emc-lab{padding:18px;border-radius:16px}
  .emc .emc-hundred-grid,.emc .emc-decimal-grid,.emc .emc-fraction-area-grid{width:min(100%,340px);gap:2px;border-width:5px}
  .emc .emc-fraction-bar>span{width:58px;font-size:.8rem}
  .emc .emc-fraction-pieces{height:48px}
  .emc .emc-upgrade-bars{padding:11px}
  .emc .emc-upgrade-bar>strong{min-width:76px;font-size:.78rem}
  .emc .emc-upgrade-ten{height:42px;gap:2px}
  .emc .emc-upgrade-cubes i{width:26px;height:26px}
  .emc .emc-upgrade-cubes{grid-template-columns:repeat(var(--cols),26px)}
  .emc .emc-plot-ticks button{min-height:116px}
  .emc .emc-upgrade-tree{grid-template-columns:repeat(2,minmax(0,1fr))}
  .emc .emc-upgrade-tree button:not(:last-child)::after{display:none}
  .emc .emc-water-story{flex-direction:column;gap:4px;padding:16px 12px}
  .emc .emc-water-stage{width:100%}
  .emc .emc-water-glass{width:47px;height:78px}
  .emc .emc-water-pair{height:102px;gap:8px}
  .emc .emc-water-arrow{margin:0;transform:rotate(90deg);font-size:1.25rem}
  .emc .emc-water-stage>strong{font-size:.83rem}
  .emc .emc-water-stage>span{min-height:0;font-size:.75rem}
}
@media(prefers-reduced-motion:reduce){.emc .emc-lab button,.emc-model-nav a{transition:none!important}}
